Jump to content

[SOLVED] Trouble with date in order


Recommended Posts

Well that is the problem..Your date format is wrong.

 

You have used dd-mm-YYYY H:i:s which will give 0101-1212-201320132013

 

This is because in PHP

 

d (single lower case d) is used to denote dates from 01-31 

m (single lower case m) is used to months 01-12

Y is four-digit year (single upper case Y and not four Ys)

H (upper case H) is 24-hour format with leading zeroes

 

You can read about the date formats here : http://php.net/manual/en/function.date.php

 

So the correct format is d-m-Y g:i:a for 01-12-2013 1:30:00 PM

Edited by ibndawood (see edit history)
Link to comment
Share on other sites

Well that is the problem..Your date format is wrong.

 

You have used dd-mm-YYYY H:i:s which will give 0101-1212-201320132013

 

This is because in PHP

 

d (single lower case d) is used to denote dates from 01-31 

m (single lower case m) is used to months 01-12

Y is four-digit year (single upper case Y and not four Ys)

H (upper case H) is 24-hour format with leading zeroes

 

You can read about the date formats here : http://php.net/manual/en/function.date.php

 

So the correct format is d-m-Y g:i:a for 01-12-2013 1:30:00 PM

Many thanks ibndawood

 

Now is date OK..

 

My mistake.

 

many many thanks for help.

 

LT

Link to comment
Share on other sites

×
×
  • Create New...