Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Date formating

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,27866
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Date formating
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Date formating - 11/8/2005 10:29:57 PM   
  rturner003

 

Posts: 2
Score: 0
Joined: 11/8/2005
Status: offline
I am not sure if this VB Script related.

On an XP machine with the regional setting set to UK, and all the date setting set to day, month, year order. Even when the VBScript on a ASP page has the code DateFormat(now,vbShortDate) the dates are display in US format of month, day,year order.

Has anyone any ideas how to sort this. It is OK on other machines.

_____________________________

Regards
Robert T Turner
 
 
Post #: 1
 
 RE: Date formating - 11/9/2005 6:22:11 AM   
  Country73


Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
Without going through and checking the various settings that may be different between your machines, you should be able to list the correct "Date Format" you want like this:

Day(NOW) & "/" & Month(NOW) & "/" & Year(NOW)


(in reply to rturner003)
 
 
Post #: 2
 
 RE: Date formating - 11/10/2005 6:58:29 AM   
  rturner003

 

Posts: 2
Score: 0
Joined: 11/8/2005
Status: offline
Thanks for your post
I am quite aware that the date could formatted, but I didn't write the script. I wanted what on my machine was causing this incase I have to deal with it on someone's else

_____________________________

Regards
Robert T Turner

(in reply to Country73)
 
 
Post #: 3
 
 RE: Date formating - 11/10/2005 9:39:55 AM   
  Country73


Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
I was mainly going off the last line you wrote in your first post:
quote:


On an XP machine with the regional setting set to UK, and all the date setting set to day, month, year order. Even when the VBScript on a ASP page has the code DateFormat(now,vbShortDate) the dates are display in US format of month, day,year order.

Has anyone any ideas how to sort this. It is OK on other machines.


With what I posted, if you put that in your script you won't have to worry about other machines displaying the date any other way than what you specify.
I would think that a script should "manipulate" to show what you want instead of having to re-write it for the various machines, or trouble shooting 1 in every 10 machines it doesn't display correctly on.
Do you plan on trouble-shooting each machine that the date does not display correctly, or would you rather have your script display it how you want?
(I don't know what all else you have going on with the script, who will be using it, etc... I'm just trying to assist with the little bit of information that you have supplied me.)

You may have already tried this, but I'm just a little curious, have you tried "Applying" the US Date Format then switching it back to UK?

(in reply to rturner003)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Date formating Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts