07-09-2007, 10:12 PM
Is it possible to format an integer representing seconds into a viewable date? I would like to be able to store dates as seconds integers for easier calculations, but can't seem to get ColdFusion to convert them back to viewable dates.
dateFormat(getTickCount(), "m/d/y") just shows up blank...
07-09-2007, 10:15 PM
Ok, I did a bit of testing and it appears that the number being returned by getTickCount is just too long. If I remove a couple digits, a date finally shows up. Is there any way to get the dateFormat() function to parse recent dates from seconds?
09-05-2007, 06:11 PM
What's the problem using the GetDate() function instead of GetTickCount()? The problem you are going to have is that if GetTickCount() is using the native Windows GetTickCount() call (which I think it does), the tick count is a 32 bit word value that starts at zero when the computer is booted. Also, it has limited range that rolls over at about 26 days.
If you only need resolution down to the second, I would rethink the solution using the GetDate() value.