EchoFool Posted November 10, 2009 Share Posted November 10, 2009 Hey, I am using timestamps which currently users all integers, but if i wanted time stamps to contain strings like: Mon 12th. Jan 2009 Can php still calculate time differences i.e Tues 13th, Jan 2009 - Mon 12th. Jan 2009 = 1 (day). I currently use time stamps in the format of: DD-MM-YYYY HH:MM:SS - which makes maths nice and simple with pre made functions. But i want to use strings in my timestamp. Does php still work it out without problems? Link to comment https://forums.phpfreaks.com/topic/180931-solved-calculations-with-strings/ Share on other sites More sharing options...
Alex Posted November 10, 2009 Share Posted November 10, 2009 Nope. You'll have to use strtotime(). Link to comment https://forums.phpfreaks.com/topic/180931-solved-calculations-with-strings/#findComment-954519 Share on other sites More sharing options...
EchoFool Posted November 10, 2009 Author Share Posted November 10, 2009 Thanks Alex Link to comment https://forums.phpfreaks.com/topic/180931-solved-calculations-with-strings/#findComment-954523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.