Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Javascript help - User input time -> date/time value for MS Access database

Reply
Thread Tools

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

 
 
Noozer
Guest
Posts: n/a
 
      08-01-2005
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
 
 
 
 
Travis Newbury
Guest
Posts: n/a
 
      08-01-2005
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)

--
-=tn=-

 
Reply With Quote
 
 
 
 
Noozer
Guest
Posts: n/a
 
      08-01-2005

"Travis Newbury" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
ASP with Access Database (Input Text - Value Display) magix ASP General 1 02-12-2006 09:27 AM
Pass input Array value to function to calc different input value Susan Cranford Javascript 2 07-05-2005 02:53 AM
Passing database info to page allow user input then pass into another database Renie83 ASP General 2 07-14-2003 05:30 PM



Advertisments