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! Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.