Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parshing Strings (dates) 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
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?
 
Use the DatePart function:

Code:
myDate = date from SQL record

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

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

Later, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top