Forum Moderators: coopster
$YmdStr = date("Y-m-d",$Start);
In which $Start contains your 8 digit value, most likely it is a Unix timestamp in which case the date function understands it and can convert it into a string based on the format string.
Thanks for the prompt and swift response.
I think i have not explained my sitaution properly. Here is my situation, I have a field in DB called “start” which is of data type int which stores 10 digit numbers.
Now I have a search form where I enter the text like this Y-m-d = 2006-11-23 after entering the date it should be able to convert the search text to 10 digit numbers where I can search for the record in DB.
So you want the other way around,
in that case you can use the strtotime [php.net] function.