![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a textbox on one of my forms that is used to accept a time from the user. I need to write this value to a database to trigger an event later on. What I'd like to know is... Are there any functions in javascript that can convert different time formats to a known format (24 hour clock)... 5pm -> 17:00 or 5:00 -> 05:00, etc. ??? |
#3
| |||
| |||
|
|
Noozer wrote: I have a textbox on one of my forms that is used to accept a time from the user. I need to write this value to a database to trigger an event later on. What I'd like to know is... Are there any functions in javascript that can convert different time formats to a known format (24 hour clock)... 5pm -> 17:00 or 5:00 - 05:00, etc. ??? Wouldn't this be better done on the server? Google "javascript date object" With it you can create a data object based on the strng the visitor enters. once it is a "date" then yo can do what ever you like with it (based on the propertied an methods of the date object) |
![]() |
| Thread Tools | |
| Display Modes | |
| |