jana Posted November 18, 2006 Share Posted November 18, 2006 can any one help me to convert the string to time type?I am having a column $t1 variable as string and the values will be stored like this '10:27 AM', '10:30 PM' and i wnt to convert it to time format b'cause i want to compare this $t1 variable as switch($t1){ case (($t1>'00:00')&&($t1<'09:00')) { $row2=$t1; break; } case (($t1>'09:00')&&($t1<'09:10')) { $row3=$t1; break; }} Quote Link to comment https://forums.phpfreaks.com/topic/27672-converting-the-string-data-type-to-time-data-type/ Share on other sites More sharing options...
sasa Posted November 18, 2006 Share Posted November 18, 2006 try strtotime() function Quote Link to comment https://forums.phpfreaks.com/topic/27672-converting-the-string-data-type-to-time-data-type/#findComment-126625 Share on other sites More sharing options...
jana Posted November 20, 2006 Author Share Posted November 20, 2006 thanx alot. and one more doubt.i want both iis and my wamp server to be run on same server can i change the port number of iis and install wamp server so that i can run bot the services can i do this. Quote Link to comment https://forums.phpfreaks.com/topic/27672-converting-the-string-data-type-to-time-data-type/#findComment-127396 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.