• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Epoch Date Conversion

Guest
Dec 04, 2007 Dec 04, 2007

Copy link to clipboard

Copied

All,
Im trying to convert an Epoch number to a Date format. The number is the total milliseconds from Jan 1, 1970 to today and is in GMT. We are physically located in Central Time. And I would like to convert it back to this format 'mmddyyyy'...

Any help will be appreciated.

Thanks!
TOPICS
Advanced techniques

Views

472

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 04, 2007 Dec 04, 2007

Copy link to clipboard

Copied

LATEST
BigFeetBigShoes wrote:
> All,
> Im trying to convert an Epoch number to a Date format. The number is the
> total milliseconds from Jan 1, 1970 to today and is in GMT. We are physically
> located in Central Time.

well if accuracy isn't such a big deal, divide the epoch offset by 1000 to get
seconds then simply use dateadd (it might overflow w/ms). otherwise might try
using java.util.Date & init it w/your epoch offset. cf should be able to use
that datetime that it produces. i think the conversion will also handle the
conversion to server timezone (tz). sorry this is from memory, at home w/out
access to a server to test.

if you need other tz then have a look at:

http://www.sustainablegis.com/projects/tz/testTZCFC.cfm

but also read these, especially the tz hell entry:

http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=cat&catid=162AEDB4-20ED-7DEE-2A6CF1B79AC2E0...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation