amalosoul Posted November 14, 2006 Share Posted November 14, 2006 I have a variable (cookie) that stores a date as a time stamp. Can I turn that timestamp into hours minutes seconds using javascript? (just like the date() function in php)Thank you in anticipation! Link to comment https://forums.phpfreaks.com/topic/27257-getting-a-date-from-a-time-stamp/ Share on other sites More sharing options...
joshi_v Posted November 15, 2006 Share Posted November 15, 2006 Yes you can do it!getTime() - Number of milliseconds since 1/1/1970 @ 12:00 AM getSeconds() - Number of seconds (0-59) getMinutes() - Number of minutes (0-59) getHours() - Number of hours (0-23) getDay() - Day of the week(0-6). 0 = Sunday, ... , 6 = Saturday getDate() - Day of the month (0-31) getMonth() - Number of month (0-11) getFullYear() - The four digit year (1970-9999) RegardsJoshi Link to comment https://forums.phpfreaks.com/topic/27257-getting-a-date-from-a-time-stamp/#findComment-124952 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.