Jump to content

[SOLVED] I am having a issue using strtotime()


stockton

Recommended Posts

If my program defines $Vandag as $Vandag = date('d/m/Y H:i:s');

and I compare that with what I retrieved from MSSQL I get:-

Vandag = 11/07/2007 17:15:23 Start = 26/06/2008 11:31:25 End = 26/07/2009 11:31:25

UVandag = 1194448523 UStart = 1265448685 UEnd = 1297071085

 

Start & End are ex MSSQL

 

and if I alter to $Vandag = date('d-m-Y H:i:s');            // Note hyphen instead of slash

the echo in my program reports:-

Vandag = 11-07-2007 17:23:59 Start = 20/06/2007 13:39:12 End = 30/12/2009 23:59:59

UVandag = 1482852239 UStart = 1218022752 UEnd = 1307915999

 

As you can see in neither case is Vandag less than Start but strtotime() seems to think that it is.

This is on a Windows XP machine and I am obviously missing something but what?

I also fail to understand why there should be a difference between hyphen seperated dates as against slash seperated.

BTW the date format is, I believe, dd/mm/ccyy

Link to comment
Share on other sites

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.