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

UNIX timestamp

Community Beginner ,
Apr 15, 2008 Apr 15, 2008
I'm looking for a way to convert a UNIX time value (1201900638) so that it outputs to a ColdFusion page in the mm/dd/yyyy format. Would anyone be able to help with that? Thanks...
TOPICS
Getting started
1.0K
Translate
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

correct answers 1 Correct answer

Mentor , Apr 15, 2008 Apr 15, 2008
According to Unix time the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds......The Unix time number is zero at the Unix epoch, and increases by exactly 86 400 per day since the epoch

Therefore, 01-JAN-1970 + (1201900638 / 86400) = 01-FEB-2008

Is this the date that equates to the "UNIX time" number that you posted?

According to unix timestamp and epoch conversion tool, 1201900638 equates to the following:

GMT: Fri, 1...
Translate
Mentor ,
Apr 15, 2008 Apr 15, 2008
LATEST
According to Unix time the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds......The Unix time number is zero at the Unix epoch, and increases by exactly 86 400 per day since the epoch

Therefore, 01-JAN-1970 + (1201900638 / 86400) = 01-FEB-2008

Is this the date that equates to the "UNIX time" number that you posted?

According to unix timestamp and epoch conversion tool, 1201900638 equates to the following:

GMT: Fri, 1 Feb 2008 21:17:18 UTC
Your timezone (PDT): Friday, February 01, 2008 1:17:18 PM


Try this:

#DateConvert("utc2Local", DateAdd("s", 1201900638, CreateDate("1970","01","01")))#

Where CreateDate() converts January 01, 1970 to a date/time, DateAdd() with an "s" parameter adds 1201900638 seconds to the "epoch" start date, and DateConvert() with "utc2Local" converts the UTC time to your local time.

You can then use DateFormat() to display it in any format that you desire.
Phil
Translate
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