Thread: Date format
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Date format

Jens,

Try NumberFormatLocal instead.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jos Vens" wrote in message
...
Thanks Tom,

but: if i use your code, I get 05-10-29 in my cell (my systemsetting is
jj-MM-dd)
but ?activecell.numberformat gives me "m/d/yyyy", which is not my
systemsetting.

Can you still help me?
Jos


"Tom Ogilvy" schreef in bericht
...
If you just put a date in an unformatted cell, it should use the default
date

activecell.Value = Date
? activeCell.NumberFormat
m/d/yy
ActiveCell.Offset(1,0).Value = Time
? activeCell.Offset(1,0).Numberformat
h:mm:ss AM/PM


--
Regards,
Tom Ogilvy



"Jos Vens" wrote in message
...
Hi,

how can I know what the default date and time format is set on the

user's
computer. Now I set it to a special format (yy-mm-dd) but the user asks
to
let it be like his computer's setting.

Thanks
Jos Vens