#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default date issue

hi,
i use excel2000
i have a problem with date format.
i get a variant with toto="15/03/2003"
when i put it in cells

dim toto as variant
with Cells(x,y)
.value = toto
.numberformat = "DD/MM/YYYY"
end with

it displays "03/15/2003" and the cell format is as"mm/dd/yy"!!!!.
i tried to format the cell before affecting data, same issue!
i tried to put data into a string var before putting it into cells
i tried to format(toto, 'dd/mm/yy")
anyway the same issue
the regional parameters are short= dd/mm/yy
long = dd/mm/yyyy


please help me!!!!!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default date issue

dim toto as long
toto = DateValue("03/15/2004")
with Cells(x,y)
.value = toto
.numberformat = "DD/MM/YYYY"
end with


--
Regards,
Tom Ogilvy



"khennet" wrote in message
...
hi,
i use excel2000
i have a problem with date format.
i get a variant with toto="15/03/2003"
when i put it in cells

dim toto as variant
with Cells(x,y)
.value = toto
.numberformat = "DD/MM/YYYY"
end with

it displays "03/15/2003" and the cell format is as"mm/dd/yy"!!!!.
i tried to format the cell before affecting data, same issue!
i tried to put data into a string var before putting it into cells
i tried to format(toto, 'dd/mm/yy")
anyway the same issue
the regional parameters are short= dd/mm/yy
long = dd/mm/yyyy


please help me!!!!!





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default date issue

Hi
try chaning the line
.value = toto
to
.value = dateserial(2003,3,15)

--
Regards
Frank Kabel
Frankfurt, Germany

"khennet" schrieb im Newsbeitrag
...
hi,
i use excel2000
i have a problem with date format.
i get a variant with toto="15/03/2003"
when i put it in cells

dim toto as variant
with Cells(x,y)
.value = toto
.numberformat = "DD/MM/YYYY"
end with

it displays "03/15/2003" and the cell format is as"mm/dd/yy"!!!!.
i tried to format the cell before affecting data, same issue!
i tried to put data into a string var before putting it into cells
i tried to format(toto, 'dd/mm/yy")
anyway the same issue
the regional parameters are short= dd/mm/yy
long = dd/mm/yyyy


please help me!!!!!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date issue Patrick C. Simonds Excel Worksheet Functions 6 January 7th 09 08:00 PM
Date issue Jim Savage Excel Discussion (Misc queries) 7 February 9th 07 03:48 PM
DATE ISSUE! Joan Excel Worksheet Functions 2 June 15th 06 03:39 PM
Date issue polk383 Excel Worksheet Functions 3 June 10th 06 06:21 PM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"