3.2.0

Unix Timestamp

Hello all!

I found an example from last year for converting and showing unix time() formated date in a grid.

Am brand new at this and am using 2.02

Here is what I have that has no effect on my date. I am sure it is something stupid I am missing as they didn't show a full example. They got up to the end and then stopped short as they both understood each other ;)

The idea is that unix time() is same as js but in seconds not ms so number is times 1000

My date is the 4th column

Here is my code;

// Unix date conversion
var uxdate = new AW.Formats.Date;
uxdate.dataToValue = function(d){return Number(d)*1000};
uxdate.setTextFormat("dd/mmm/yy hh:mm:ss");

// this is where they stopped, next line is my attempt.
obj.setCellFormat(uxdate, 3);

Can anyone help fill in the missing steps to format my unix time?

Thank you!
SunBum
September 17,
Here is the orig post:

http://www.activewidgets.com/javascript.forum.15497.2/timestamp-with-a-different-timezone.html
SunBum
September 17,
correction on post link, sorry

http://www.activewidgets.com/javascript.forum.15291.2/unix-timestamp-any-suggestions-how.html
SunBum
September 17,
Your code is correct. Should work (or the problem is somewhere else).
Alex (ActiveWidgets)
September 18,
The problem WAS in fact elsewhere and I had tried too many changes at once.

The code above DOES work great.

Thanks Alex!
SunBum
September 18,

This topic is archived.

See also:


Back to support forum