|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Javascript Unix Timestamp I need code to for Unix timestamp in Javascript language. I tried to create a time object and function which works with time and date but program won't convert this to a UNIX timestamp. |
#2
| |||
| |||
Re: Javascript Unix Timestamp Code for Javascript Unix Timestamp : Code: var nDate = n Date( ); nDate.setTime( unixtime*1000 ); dateString = nDate.toUTCString ); |
#3
| |||
| |||
Re: Javascript Unix Timestamp To convert the current date and time to a UNIX timestamp in JavaScript follow the given example : Code: var time = Mth.round(new Date().getTime() / 1000); |
#4
| |||
| |||
Re: Javascript Unix Timestamp try this for Javascript Unix Timestamp : Code: b = new Date() var e = Number(Date.UTC(b.getFullYear(),b.getMonth(),b.getDate(),b.getHours(),b.getMinut es(),b.getSeconds(),0)); e = e/1000; // e would be the Unix timestamp for this moment. |
![]() |
|
Tags: function, javascript, unix timestamp |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem in retrieving timestamp | Logan 2 | Software Development | 5 | 12-02-2010 01:55 AM |
What is Timestamp in SQL? | Shekhar12 | Software Development | 4 | 30-11-2009 10:02 AM |
C# timestamp datatype | Mehraj | Software Development | 3 | 04-08-2009 06:58 PM |
How to convert UNIX timestamp to MySQL | Warner | Software Development | 2 | 16-05-2009 08:20 PM |
Criteria with timestamp in MySQL | Kirt | Software Development | 3 | 09-05-2009 12:09 PM |