Results 1 to 4 of 4
  1. #1
    mike760534211 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    12

    TimeStamp Issues


    I have a database where it writes a few different timestamps into fields. This works correctly and is not an issue on the actual function. The issue is that I people updating records and the timestamp is for their local time and they are 11.5 hours ahead of CST.

    Is there a way to force it to always write the timestamp in CST without regard to the timezone that the user is in?

    To conclude I have to say I am very green in Access for this kind of function and any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Subtract 11.5 hours from their local time. Use DateDiff function.

    If the db will be used within various time zones and you want all dates in CST, need to make the db 'smart' about where the db is and the time difference. One approach is a table of the timezones and time variances from CST. And using the correct variance based on where the db is which can be determined by code when the db is opened.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mike760534211 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    12
    I already have a module that can read all the timezones from the system registry. The database would only be used in 2 timezones but i dont want it to calculate if the database is being updated in CST timezone.

    Quote Originally Posted by June7 View Post
    Subtract 11.5 hours from their local time. Use DateDiff function.

    If the db will be used within various time zones and you want all dates in CST, need to make the db 'smart' about where the db is and the time difference. One approach is a table of the timezones and time variances from CST. And using the correct variance based on where the db is which can be determined by code when the db is opened.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    An expression could use IIf:

    DateDiff("h", IIf(timezone()="CST",0,-11.5), [datefield])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Insert A TimeStamp
    By dandoescode in forum Forms
    Replies: 3
    Last Post: 06-25-2012, 12:34 PM
  2. Passthrough over a timestamp?
    By KrisDdb in forum Access
    Replies: 1
    Last Post: 01-10-2012, 06:42 PM
  3. Add timestamp after text entry
    By JeffG3209 in forum Programming
    Replies: 4
    Last Post: 06-29-2011, 10:21 PM
  4. Access Query to Check Timestamp
    By Meh in forum Access
    Replies: 1
    Last Post: 12-21-2010, 07:18 PM
  5. Access Timestamp...
    By HMel in forum Access
    Replies: 4
    Last Post: 08-19-2008, 01:30 PM

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