jtjtjthey Posted July 23, 2008 Share Posted July 23, 2008 I'm kinda new to php programming and the coding below seems ok but it displays an error like this: http://localhost/strftime.php. <?php $format="%d/%m/%Y %H: %M: %S"; $strf=strftime($format); echo("$strf"); print_r(strptime($format,$strf)); ?> Is strptime() function cannot be used in window platform? But without using it how can I determine the subtraction between two timestamps for time validation input? I'm using xampp 1.5.5 version. Anybody please help!! Quote Link to comment https://forums.phpfreaks.com/topic/116114-strftime-function-error-help/ Share on other sites More sharing options...
jtjtjthey Posted July 23, 2008 Author Share Posted July 23, 2008 Oops! the error is like this: Fatal error: Call to undefined function strptime() in C:\Program Files\xampp\htdocs\strftime.php on line 5 Sorry for the trouble. Quote Link to comment https://forums.phpfreaks.com/topic/116114-strftime-function-error-help/#findComment-597094 Share on other sites More sharing options...
kenrbnsn Posted July 23, 2008 Share Posted July 23, 2008 If you read the manual entry for strptime(), you will notice this: Note: This function is not implemented on Windows platforms. at the bottom of the page. Ken Quote Link to comment https://forums.phpfreaks.com/topic/116114-strftime-function-error-help/#findComment-597100 Share on other sites More sharing options...
jtjtjthey Posted July 23, 2008 Author Share Posted July 23, 2008 If you read the manual entry for strptime(), you will notice this: Note: This function is not implemented on Windows platforms. at the bottom of the page. Ken Hi Ken: Thanks Ken for the reply but I dunno what to do right now if strptime() cannot be used. Now I'm facing a problem related to calculating the user input of timestamp. Lets say the timestamp of $assignation_starts = '23-7-2008 10:55:23' and $assignation_ends = '24-7-2008' how can I calculate the subtraction between this two values? without using strptime() how can I perform such calculation? To subtract this two values we need to separate '23-7-2008 10:55:23' so that it can be inserted into mktime() right? Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/116114-strftime-function-error-help/#findComment-597110 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.