convert from Unix time

B

Bill

I am writing a query with Unix dates as input that I need to convert to
readable dates. The application has - CvrtFromUnixTime([date]) - but ACCESS
says it's not a valid expression, yet it works in the application that
contains the file?!?

How, in an ACCESS Query, can I this Unix date converted?
 
B

Brian

Since many Access built-in functions are not natively available in SQL, you
may have to create a user-defined function that uses the conversion function,
then call your user-defined function from your query.
 
B

Bill

I figured that out. So, now the question is - "What is the code to do this
conversion"?

Brian said:
Since many Access built-in functions are not natively available in SQL, you
may have to create a user-defined function that uses the conversion function,
then call your user-defined function from your query.

Bill said:
I am writing a query with Unix dates as input that I need to convert to
readable dates. The application has - CvrtFromUnixTime([date]) - but ACCESS
says it's not a valid expression, yet it works in the application that
contains the file?!?

How, in an ACCESS Query, can I this Unix date converted?
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In the original application there is a user-defined function named
"CvrtFromUnixTime()," that has a Date/Time parameter. Open a VBA module
in that application and do a Find (Ctrl-F) for "CvrtFromUnixTime" (no
quotes). Be sure to search the "Current Project." If you don't find
it, that probably means it may be in an attached code library file. If
that file is not locked (not an .mde) file you can open one of it's VBA
modules & do the search for the function.

When you find the functin copy it into your new application. Then the
query should work.

If you can't get that to work, I posted a conversion function in another
thread in this newsgroup: "Convert UNIX time to windows general date."
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQwzng4echKqOuFEgEQL4PACgzeYfxuicM3uZC9rcUiI7fzm1QRwAn2bY
sVBhV2DrSzqr4xd4aiWCuk09
=YWK7
-----END PGP SIGNATURE-----
I figured that out. So, now the question is - "What is the code to do this
conversion"?

:

Since many Access built-in functions are not natively available in SQL, you
may have to create a user-defined function that uses the conversion function,
then call your user-defined function from your query.

:

I am writing a query with Unix dates as input that I need to convert to
readable dates. The application has - CvrtFromUnixTime([date]) - but ACCESS
says it's not a valid expression, yet it works in the application that
contains the file?!?

How, in an ACCESS Query, can I this Unix date converted?
 
B

Bill

Thanks, I found the function hiding in a Module.

Your email sent me in the right direction and helped me the most! - THANKS!!

MGFoster said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In the original application there is a user-defined function named
"CvrtFromUnixTime()," that has a Date/Time parameter. Open a VBA module
in that application and do a Find (Ctrl-F) for "CvrtFromUnixTime" (no
quotes). Be sure to search the "Current Project." If you don't find
it, that probably means it may be in an attached code library file. If
that file is not locked (not an .mde) file you can open one of it's VBA
modules & do the search for the function.

When you find the functin copy it into your new application. Then the
query should work.

If you can't get that to work, I posted a conversion function in another
thread in this newsgroup: "Convert UNIX time to windows general date."
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQwzng4echKqOuFEgEQL4PACgzeYfxuicM3uZC9rcUiI7fzm1QRwAn2bY
sVBhV2DrSzqr4xd4aiWCuk09
=YWK7
-----END PGP SIGNATURE-----
I figured that out. So, now the question is - "What is the code to do this
conversion"?

:

Since many Access built-in functions are not natively available in SQL, you
may have to create a user-defined function that uses the conversion function,
then call your user-defined function from your query.

:


I am writing a query with Unix dates as input that I need to convert to
readable dates. The application has - CvrtFromUnixTime([date]) - but ACCESS
says it's not a valid expression, yet it works in the application that
contains the file?!?

How, in an ACCESS Query, can I this Unix date converted?
 

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