Convert Unix column to date and time in 2 columns

L

LizB

I used the following as a query expression to convert unix timestamp.
DateAdd("s",UnixDate,#1/1/1970#)
This got it done but I am now wanting to go one step further and be able to
have the date in one column and the time in another for additional queries
vs. having them in the same column. Any suggestion?

The formula takes this value 1181836800
and returns this: 6/14/2007 4:00:00 PM

I would like to somehow end up with 6/14/2007 in one columen and 4:00:00 PM
in another.
 
M

Michel Walsh

DateValue(date_time_value) and TimeValue( date_time_value)


Vanderghast, Access MVP
 
L

LizB

Very cool. That did it. Thanks a lot!

For anyone else wanting to do this . . . . . I hid Expr1
Expr1: DateAdd("s",[reqChangeDate],#1/1/1970#)
Expr2: DateValue([Expr1])
Expr3: TimeValue([Expr1])
 

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