Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2008

Tip: Looking for answers? Try searching our database.

Time Values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken - 28 Mar 2008 07:19 GMT
I am parsing and inputting file data into the database.

I have a time value of 1205206829 that corresponds to 3/10/2008 11:40 pm.  I
have tried a number of time formats but I can not get it to work out - any
help would be appreciated.

I believe the number format starts in 1970 because when I divide the number
by 31556736 I get 38.

Thanks.
John Spencer - 28 Mar 2008 12:26 GMT
Try using the following expression to convert the time value to an Access
DateTime value.

  DateAdd("s",YourNumberValue,#1/1/1970#)

That returns 3/11/2008 3:40:29 AM for 1205206829

Which is off by 4 hours if your statement -"1205206829 that corresponds to
3/10/2008 11:40 pm" - is correct .  I am guessing that the offset is due to
a conversion from some universal standard time to local time

You can adjust that by subtrracting 4 hours to convert to your local time.

 DateAdd("h",-4,DateAdd("s",YourNumberValue,#1/1/1970#))

Signature

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.

>I am parsing and inputting file data into the database.
>
[quoted text clipped - 8 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.