Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
I use Office2k and windows XP on two computers.
But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Know I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
Maybe you could have the user type the date in an unambiguous format:
October 2, 2006 (so it'll be clear to both your code and the user) or use a calendar control... Ron de Bruin has some tips/links at: http://www.rondebruin.nl/calendar.htm "Jan T." wrote: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Know I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
Thank you for helping. But I am curious why my two Computers behave
differently? I am using same OS and same software version. Another thing here is that I am using ADO 2.8 and will save records including dates. There must be some settings I have overseen, don't you think? Anybody? Regards Jan "Dave Peterson" skrev i melding ... Maybe you could have the user type the date in an unambiguous format: October 2, 2006 (so it'll be clear to both your code and the user) or use a calendar control... Ron de Bruin has some tips/links at: http://www.rondebruin.nl/calendar.htm "Jan T." wrote: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Now I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
try:
TextBox1.Value = Format(Date,"dd-mm-yyyy") or TextBox1.Value = Format(Date,"dd.mm.yyyy") or TextBox1.Value = Format(Date,"dd/mm/yyyy") or TextBox1.Value = Format(Date,"dddd dd.mm/yyyy") or ... "Jan T." skrev: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Know I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
Maybe there's a difference between the windows short date format (under control
panel's regional settings)??? "Jan T." wrote: Thank you for helping. But I am curious why my two Computers behave differently? I am using same OS and same software version. Another thing here is that I am using ADO 2.8 and will save records including dates. There must be some settings I have overseen, don't you think? Anybody? Regards Jan "Dave Peterson" skrev i melding ... Maybe you could have the user type the date in an unambiguous format: October 2, 2006 (so it'll be clear to both your code and the user) or use a calendar control... Ron de Bruin has some tips/links at: http://www.rondebruin.nl/calendar.htm "Jan T." wrote: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Now I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. -- Dave Peterson -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
You can also check your regional settings in Control Panel to see if it is
set for English(United States) on both computers. "Jan T." wrote: Thank you for helping. But I am curious why my two Computers behave differently? I am using same OS and same software version. Another thing here is that I am using ADO 2.8 and will save records including dates. There must be some settings I have overseen, don't you think? Anybody? Regards Jan "Dave Peterson" skrev i melding ... Maybe you could have the user type the date in an unambiguous format: October 2, 2006 (so it'll be clear to both your code and the user) or use a calendar control... Ron de Bruin has some tips/links at: http://www.rondebruin.nl/calendar.htm "Jan T." wrote: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Now I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
I have already checked regional settings but cannot find any different
settings They sure look the same when it comes to date format, short date, middel date and so on. ? Jan "JLGWhiz" skrev i melding ... You can also check your regional settings in Control Panel to see if it is set for English(United States) on both computers. "Jan T." wrote: Thank you for helping. But I am curious why my two Computers behave differently? I am using same OS and same software version. Another thing here is that I am using ADO 2.8 and will save records including dates. There must be some settings I have overseen, don't you think? Anybody? Regards Jan "Dave Peterson" skrev i melding ... Maybe you could have the user type the date in an unambiguous format: October 2, 2006 (so it'll be clear to both your code and the user) or use a calendar control... Ron de Bruin has some tips/links at: http://www.rondebruin.nl/calendar.htm "Jan T." wrote: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Now I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. -- Dave Peterson |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Us date versus EU date problem
I have thought of that. Look what the following code returned:
In an other Standard Module I have a variabel Public EuDate As Date In the UserForms Module; Private Sub UserForm_Initialize() Me.TextBox1.Value = Date EuDate = Me.TextBox1.Value MsgBox "EUdato as US: " & EuDate ' Returns 10.02.2006 ' This is what surprices me??? This also returns 10.02.2006 ' even when I spesificly formated the date MsgBox "Fomated: " & Format(EuDate, "dd.mm.yyyy") ' when the UserForm1 finally shows, the text box is ' showing 10\2\2006. End Sub I cannot format the date in this Example? However in a standard module the following code return EU date format: Sub TestDATE() MsgBox Date ' Returns 10.02.2006 End Sub Weird? This is what I am dealing with. Regards Jan "excelent" skrev i melding ... try: TextBox1.Value = Format(Date,"dd-mm-yyyy") or TextBox1.Value = Format(Date,"dd.mm.yyyy") or TextBox1.Value = Format(Date,"dd/mm/yyyy") or TextBox1.Value = Format(Date,"dddd dd.mm/yyyy") or ... "Jan T." skrev: I use Office2k and windows XP on two computers. But, when I make a UserForm1 with a text box, my initialize procedure set the TextBox1.Value = Date. However the result differ on the two PCs. One UserForm shows US date format 10/2/2006. The other Computer has exactly the same code but shows 02.10.2006 (e.i. October, the 2nd.,2006). Know I want the european date format "dd.mm.yyyy". How can I achieve this? Or what settings should I change? Thanks in advance for helping! Mvh Jan. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date versus number format | Excel Discussion (Misc queries) | |||
Different results: Networkdays versus date subtraction | Excel Worksheet Functions | |||
Exel increment date problem wrt todays date. | Excel Worksheet Functions | |||
Date Formula Problem - Leave date blank if Null | Excel Worksheet Functions | |||
Report Date - Date Recv = Days Late, but how to rid completed date | Excel Worksheet Functions |