Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    12

    Converting UNIX time

    Hi,
    I am trying to convert a UNIX Timestamp to a normal date. I am using Microsoft Access 2003 on an XP Operating system. I am getting a runtime error #6. Can someone please tell me how to fix this? Here is my code:

    UNIXDateTimeStamp = 1306347240612

    Public Function sDate(UNIXDateTimeStamp As Double)
    sDate = DateAdd("s"), UNIXDateTimeStamp,"01/01/1970 hh:mm:ss")


    End Function

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    See if this link helps with the epoch datetime: http://www.newgrove.co.nz/stuff/convert_datetime.php

  3. #3
    Join Date
    Aug 2011
    Posts
    12

    convert unix time

    Ruralguy,
    It turns out I had to many digits. Once I knocked it down to 10 digits, it ran correctly. Thanks for your quick reply.

    Sharon

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great! Thanks for posting back with your success.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Converting mde to mdb
    By Jdejesus in forum Access
    Replies: 2
    Last Post: 04-08-2011, 11:52 AM
  2. Converting a date to length of time
    By Duncan in forum Access
    Replies: 2
    Last Post: 11-10-2010, 05:53 AM
  3. Converting HH:MM to decimal
    By katrinanyc926 in forum Queries
    Replies: 5
    Last Post: 08-13-2010, 02:39 PM
  4. Replies: 2
    Last Post: 07-03-2010, 08:45 PM
  5. Unix Time
    By wifor in forum Programming
    Replies: 2
    Last Post: 07-29-2008, 11:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums