View Single Post
  #2 (permalink)  
Old June 13th, 2008, 01:27 PM
Old Pedant Old Pedant is offline
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Looks like a bug to me!

Obviously, the simple WScript.Echo is paying attention to the Locale and is giving you the DD/MM/YYYY format you expect.

But for some reason INPUTBOX is ignoring the locale.

What you *MIGHT* try is converting the date to string *before* passing it to the inputbox.

Humor me and try this:

today = CStr(Date())
Wscript.Echo today
strValue = InputBox("Enter Start Date:","Test", today)
Wscript.Echo today

It may be wrong--it might always show MM/DD/YYYY--but at least it should be consistent.

Reply With Quote