Jump to content

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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.