PDA

View Full Version : Receiving and Posting Timestamp with millisecond value



baven
10 Jul 2010, 4:51 PM
Hi
I am getting the timestamp with the millisecond value from the server and want to post it back to the server with the same millisecond value. How do I do this?. I tried dateFormat:'c' in the extjs reader, but when I display that it shows 000 for millisecond
(m/d/Y H:i:s.u).

data in the db : 2010-07-10 18:54:59.199475 (total msec value : 1278802499199)
when I post it back to the server : 2010-07-10 18:54:59 (total msec value : 1278802499000)

server side : jdk 1.6
ext js : 3.2.1

Thanks in advance.

mystix
11 Jul 2010, 9:50 PM
dateFormat only configures the reader.
you'll need to manually convert the Date object in the Store to a unix timestamp value (i.e. via Date#getTime()) before sending it back to the server.


p.s. i've deleted your double post in the Open Discussion forum.