Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Parshing Strings (dates)

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Parshing Strings (dates)
  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 >>
 Parshing Strings (dates) - 6/8/2001 9:25:54 AM   
  century

 

Posts: 10
Score: 0
Joined: 6/7/2001
From: USA
Status: offline
Hi,I have a problem...I had a textfield where dispaled dates from
an SQL db. I want to replace it with 3 drop down menus, but
when the page will be loaded, I would like the drop down menus
to display the dates as before, but each drop down menu will
display the day, the month and the year seperatelly. Can you help
me with the code for parshing the string(dates) and put it in
variables
dd &"/" & mm & "/" & yyyy in order to have the willing resaults?
 
 
Post #: 1
 
 Re: Parshing Strings (dates) - 6/8/2001 9:27:14 AM   
  daydreamer

 

Posts: 19
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
Use the DatePart function:


myDate = date from SQL record

dd = DatePart("d", myDate)
mm = DatePart("m", myDate)
yyyy = DatePart("yyyy", myDate)

returnDate = dd & "/" & mm & "/" & yyyy

(in reply to century)
 
 
Post #: 2
 
 
 
  

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 >> Parshing Strings (dates) 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