• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

Unix Time stamps

Hello,

Does anyone have a coldfusion script to convert a normal date/time ie: now() into a unix timestamp.

Many Thanks
0
doggybs
Asked:
doggybs
  • 2
  • 2
1 Solution
 
mkishlineCommented:
<cfset unixtimestamp = DateDiff("s",CreateDate(1970,1,1),Now()) />
0
 
doggybsAuthor Commented:
Spot on! cheers mkishine.
0
 
doggybsAuthor Commented:
Do you have any ideas on getting the time stamp in milliseconds?

Thanks
0
 
mkishlineCommented:
Coldfusion doesn't have any functions that determine time stamps with that degree of accuracy, so your best bet would be to ballpark the value by multiplying your timestamp by 1000.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now