Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Date format (Urgent!!!)

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Date format (Urgent!!!)
  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 format (Urgent!!!) - 4/4/2006 2:25:55 AM   
  buffalokml

 

Posts: 15
Score: 0
Joined: 4/3/2006
Status: offline
Hi All,

I want to covert date from 03/03/2006 to 03-MAR-2006 using vbscript. How do I archieve this.

Thanks so much

Best Regards,
 
 
Post #: 1
 
 RE: Date format (Urgent!!!) - 4/4/2006 2:31:48 AM   
  sorex

 

Posts: 77
Score: 0
Joined: 3/9/2006
Status: offline
 
This is how I would do it


      

(in reply to buffalokml)
 
 
Post #: 2
 
 RE: Date format (Urgent!!!) - 4/4/2006 2:35:12 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
Excellent solution Sorex. If you need to have the month be upper case as in your example, then:


      

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to sorex)
 
 
Post #: 3
 
 RE: Date format (Urgent!!!) - 4/4/2006 2:38:20 AM   
  sorex

 

Posts: 77
Score: 0
Joined: 3/9/2006
Status: offline
Oopz  ;o) But that's the last thing I do actually, "design" the layout when everything actually works otherwise when you gave up it was a waste of time anyway

(in reply to ebgreen)
 
 
Post #: 4
 
 RE: Date format (Urgent!!!) - 4/4/2006 3:05:41 AM   
  buffalokml

 

Posts: 15
Score: 0
Joined: 4/3/2006
Status: offline
Thanks so much for all of your quick responded, it works perfectly.....

Best Regards,

(in reply to sorex)
 
 
Post #: 5
 
 RE: Date format (Urgent!!!) - 4/4/2006 4:26:36 AM   
  DiGiTAL.SkReAM


Posts: 1193
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
For more info on date functions, try : http://www.winguides.com/scripting/reference.php?category=23

_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to buffalokml)
 
 
Post #: 6
 
 RE: Date format (Urgent!!!) - 4/6/2006 12:49:23 AM   
  hamboy

 

Posts: 94
Score: 6
Joined: 7/11/2005
Status: offline
Just to correct... it should be:
mydate=stuff(1)&"-"&left(monthname(stuff(0)),3)&"-"&stuff(2)

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 7
 
 RE: Date format (Urgent!!!) - 4/6/2006 5:15:38 AM   
  sorex

 

Posts: 77
Score: 0
Joined: 3/9/2006
Status: offline
not for euro guys like me who tend to use dd/MM/YYYY

(in reply to hamboy)
 
 
Post #: 8
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Date format (Urgent!!!) 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