Insert, Update and Delete
MySQL has a 14 byte
So Having this numeric format is very useful because you can numerically compare dates to see if one is earlier than the other. Having each digit be a month, day, year, etc. means that you can quickly and easily create these dates. If you are requesting a date from a user, I'd highly recommend setting up a series of pulldown menus to build the date. One select field for each of the year, month, day, hour, etc. It's a lot of HTML to write out but it makes the backend code SO much easier. Just paste the multiple variables together in a string to create your date string. $datetime = $year.$month.$day.$hour.$min.$sec; Note: There aren't any corrections for timezone, you'll need to do those on your own. It's difficult with most web applications because the browsers do not export what timezone they are from in the HTTP headers. If you have any questions, feel free to send me email at: rene@vtwebwizard.com. I can't promise I'll answer your questions but if I've got the spare time, I'll take a shot at it. Of course, part of the reason I put this little tutorial together is to help advertise my own consulting services. Please take a look around the rest of my website if you have a project that you think I could assist you on, please let me know. | ||
![]() |
![]() |
![]() |
Vt. Web Wizard Home | Email Questions & Comments
© 1998 Vt. Web Wizard