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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expression 1

Status
Not open for further replies.

78758

Technical User
Joined
Jan 9, 2003
Messages
1
Location
US
How to write an expression in query to format the month converting 1 (Jan) to 01 from a field order_date (1/1/2001)???

Thanks
 
This will highly depend on the DBMS. I will suggest doing the formatting stuff in the VBS code, something like this:
Code:
myArray=Split(rs("order_date"),"/")
myDate = Right("0" & myArray(0),2) _
 & "/" & Right("0" & myArray(1),2) _
 & "/" & myArray(2)

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top