Hi!! I have to use php function date_parse but it is supported for 5.2.*. So is there any alternative for function date_parse for php 5.1.*. Hope to get answer........
Thanks ............
Hi!! I have to use php function date_parse but it is supported for 5.2.*. So is there any alternative for function date_parse for php 5.1.*. Hope to get answer........
Thanks ............
Don't know exactly what you mean by alternative but check this out:
Tip: look to the left you will see related functions.
Try:
getdate(strtotime($datestr))
Note that some keys are slightly different (eg. 'seconds' rather than 'second' and 'mday' rather than 'day') and getdate doesn't include any error information. getdate
also doesn't support fractions of a second.
Just wonder what for?
strtotime() seems to be the closest answer. Use timestamps (see time(), mktime() etc.) to avoid such string parsing.