Jump to content

strftime() function error? Help!


jtjtjthey

Recommended Posts

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!!

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/116114-strftime-function-error-help/
Share on other sites

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.