stockton Posted July 11, 2007 Share Posted July 11, 2007 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 https://forums.phpfreaks.com/topic/59463-solved-i-am-having-a-issue-using-strtotime/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.