Morning all,
I have a table containing 4k+ records each has a date stored as a text field in the format d/m/yy (ie 01/01/99 or could be 1/1/99).
Ive ran a script against the table to populate the UNIX date for each record using a straight forward logic of splitting the date into its day/month and year values then using mktime.
The script has worked for almost all of the dates however there are a range at the start which have all been populated as 0 (zero).
These are dates in the range 07/04/1892 to 07/12/1901 (the dates from 14/12/1901 to the present day are then correctly populated).
I assumed it was a mktime problem with the older dates however Ive tested them on a basic online converter and they convert ok there.
Im a little lost on this one, Ive echo'd the variables and the script is correctly splitting the data and producing valid values for day, month and year.
Any thoughts would be appreciated.
I have a table containing 4k+ records each has a date stored as a text field in the format d/m/yy (ie 01/01/99 or could be 1/1/99).
Ive ran a script against the table to populate the UNIX date for each record using a straight forward logic of splitting the date into its day/month and year values then using mktime.
The script has worked for almost all of the dates however there are a range at the start which have all been populated as 0 (zero).
These are dates in the range 07/04/1892 to 07/12/1901 (the dates from 14/12/1901 to the present day are then correctly populated).
I assumed it was a mktime problem with the older dates however Ive tested them on a basic online converter and they convert ok there.
Im a little lost on this one, Ive echo'd the variables and the script is correctly splitting the data and producing valid values for day, month and year.
Any thoughts would be appreciated.