bradbritton
asked on
How to calculate date in Access 2003
I have a query where I need to calculate the number of days from January 1st 1960, based on the data pulled.
For Example:
December 31 1959 = -1
Janurary 2nd 1960 = 1
I have tried the DateDiff ('d', 01/01/1960, [tablename].[date]) , but this doesnt seem to work properly...
Thanks,
Brad
For Example:
December 31 1959 = -1
Janurary 2nd 1960 = 1
I have tried the DateDiff ('d', 01/01/1960, [tablename].[date]) , but this doesnt seem to work properly...
Thanks,
Brad
ASKER
I am using Access to build my queries, but I am actually connected to an Oracle DB. Is this still possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using linked tables.
Did you try the first post #26440626 ?
Curious - As indicated, my 1st post should have been the correct Syntax for your scenario with Linked Tables.
Did this work for you?
Did this work for you?
select [mydatefield]-#1/1/1960# as NumberofDays from mytable;