Vivid Lust Posted May 24, 2009 Share Posted May 24, 2009 Hey all! How can I convert: 1969-12-31 19:33:29 into, for example: 22nd May at 19:33 Assuming that the timestamp represents 22nd May, 19:33 Thanks, Jake. Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/ Share on other sites More sharing options...
Vivid Lust Posted May 24, 2009 Author Share Posted May 24, 2009 Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/#findComment-841262 Share on other sites More sharing options...
papaface Posted May 24, 2009 Share Posted May 24, 2009 Try google. There are thousands and thousands of tutorials on this basic stuff tbh. Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/#findComment-841266 Share on other sites More sharing options...
Vivid Lust Posted May 24, 2009 Author Share Posted May 24, 2009 Yeah, and I've tried what I've come across and they don't worry Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/#findComment-841269 Share on other sites More sharing options...
thebadbad Posted May 24, 2009 Share Posted May 24, 2009 echo date('jS F \a\t H:i', strtotime('1969-12-31 19:33:29')); Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/#findComment-841305 Share on other sites More sharing options...
Maq Posted May 25, 2009 Share Posted May 25, 2009 Please refer to the manual next time - date. The date() function takes in a format string and an optional timestamp (which is what you have). BTW, the strtotime isn't necessary. Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/#findComment-841485 Share on other sites More sharing options...
Ken2k7 Posted May 25, 2009 Share Posted May 25, 2009 Hey all! How can I convert: 1969-12-31 19:33:29 into, for example: 22nd May at 19:33 Assuming that the timestamp represents 22nd May, 19:33 Thanks, Jake. How would someone convert 1969-12-31 19:33:29 to 22nd May at 19:33? I guess you can add/subtract some months and days, but I don't see the conversion logic there. Quote Link to comment https://forums.phpfreaks.com/topic/159478-timestamp-conversion/#findComment-841512 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.