details212
asked on
Format Date from a Recordset
Hello All
I am trying to format the date returned from a recordset. It's coming from microsoft access like this : 10/20/2009 11:52:02 PM
I am looking to write it out in the w3c standard. The accepted date format that I need it in is:
2009-10-20
Year-Month(2 digit)-Dar(2 digit)
Thank you
I am trying to format the date returned from a recordset. It's coming from microsoft access like this : 10/20/2009 11:52:02 PM
I am looking to write it out in the w3c standard. The accepted date format that I need it in is:
2009-10-20
Year-Month(2 digit)-Dar(2 digit)
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Link to another Post
assuming the name of your field is purchasedOn, instead of executing:
SELECT purchasedOn FROM tableName
use:
SELECT FORMAT([purchasedOn],"yyyy
On your recordset:
rs.Fields("purchaseDate").
will have the formatted date