HighDots Forums  

Javascript help - User input time -> date/time value for MS Access database

alt.html alt.html


Discuss Javascript help - User input time -> date/time value for MS Access database in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Noozer
 
Posts: n/a

Default Javascript help - User input time -> date/time value for MS Access database - 08-01-2005 , 04:44 AM






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. ???

Assuming that I get the input into a 24 hour format, how can I create a full
time/date variable with todays date and the users entered time?

Finally, if the entered time is earlier than the current time, how can I
create the above date/time combination using tomorrows date?

Thanks!!!




Reply With Quote
  #2  
Old   
Travis Newbury
 
Posts: n/a

Default Re: Javascript help - User input time -> date/time value for MS Access database - 08-01-2005 , 06:17 AM






Noozer wrote:
Quote:
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)

--
-=tn=-



Reply With Quote
  #3  
Old   
Noozer
 
Posts: n/a

Default Re: Javascript help - User input time -> date/time value for MS Access database - 08-01-2005 , 07:00 AM




"Travis Newbury" <TravisNewbury (AT) hotmail (DOT) com> wrote

Quote:
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)
Thx... I decided to avoid the headache and imposed a selection (using
<SELECT>) instead. Much easier than trying to guess what the users trying to
enter.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.