Access Query w/ Unix Date Criteria

C

CDF

I have a pass through query that pulls information from an oracle
datasource. I need to be able to set a date critera for a field in my
query. For Example I want to only pull data where RES_DATE is greater
than 12/01/2003. The RES_DATE field type is some unix time (example-
1072881348) I have tried just setting normal data critera in the
access query but it doesnt like the format. Does anybody know how to
set this type of criteria? Any help is appreciated-Corey
 
D

Douglas J. Steele

The Unix Date is the number of seconds since January 1st, 1970.

To convert from a regular date to a Unix date, use DateDiff("s", #1/1/1970#,
Date())

To convert from a Unix date to a regular date, use DateAdd("s", UnixDate,
#1/1/1970#)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top