Feb 13, 2004 #1 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
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
Feb 13, 2004 1 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR 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 Upvote 0 Downvote
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