Page 1 of 1
Calendar script
Posted: Mon Mar 13, 2006 9:57 pm
by alix
Im using a snipplet that i found here,
Click here Its a script from this forum. It works, but what would i have to change to get it to display the month and day with two digits, IE. "01" instead of "1" or "09 instead of "9" .. etc.
My goal is to get "2006-03-13" in the text box instead of "3/13/2006"
Thanks
Posted: Mon Mar 13, 2006 10:20 pm
by feyd
concentrate on all calls to
date()
Posted: Mon Mar 13, 2006 10:24 pm
by alix
I did, and when it appears to be, for instance, calling the day of the month, its using the "d" which is for the 2 digit number for the day of the month for the date() function.. this is why im lost... then again, sometimes i believe my mind is constantly lost... who knows. lol
Posted: Mon Mar 13, 2006 10:27 pm
by feyd
there are several using n and j
Posted: Mon Mar 13, 2006 10:36 pm
by alix
I think it has something to do with this function strtotime(). I just read up on it... Apparently it doesnt spit out both digits on the older versions of PHP.. wont really work for MySQL datetime strings, which is what im working for.
Posted: Mon Mar 13, 2006 10:38 pm
by feyd
strtotime() returns a unix timestamp, not a formated string.