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!

dates to number

Status
Not open for further replies.

wdbouk

Technical User
May 28, 2003
81
CA
I am wondering if I have a column of dates that I want to transfer to numbers (like excel) is it possible to so with access. My file is large and I can't transfer to excel to do the date conversion.
Thx
 
Which number ? Number of days since 1899-12-30 ?
SELECT CLng([your DateTime field]) As NumberOfDays
FROM yourTable;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I wrote the following query

SELECT CLng([date_acquired]) AS NumberOfDays
FROM [Trading volume];

and i received a conversion error and the column of number of days was empty. The problem is not solved.
 
What is the datatype of date_acquired ?
Have you tried to play with the CDate function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
it was text. everything works fine now after converting the type to date/time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top