Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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
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 versus number format Chuck Bennett Excel Discussion (Misc queries) 3 May 20th 09 08:33 PM
Different results: Networkdays versus date subtraction OxonLad Excel Worksheet Functions 6 June 18th 08 03:38 PM
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
Date Formula Problem - Leave date blank if Null Gayla Excel Worksheet Functions 5 April 24th 07 09:42 PM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM


All times are GMT +1. The time now is 01:12 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"