Thread: date and time

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    0
    Rep Power
    0

    date and time


    I have a html form and a jsp page saving the information added in the form to the database. What I want to do in my jsp page is when I am recieving the parameters from the html page I want to generate the date and the time and save them as strings seperately into my database along with the rest of my strings. Is this possible?
  2. #2
  3. No Profile Picture
    Java Developer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Posts
    5
    Rep Power
    0
    Yeah. You can either use the database to generate them, or you can do Calendar.GetInstance(), and then use all the get methods on it to construct a string of the format you want.

    Important Note: for some obscure reason january is month 0 not month 1 and it counts from there, which is very weird, but was the same in the Date class aswell. You'd have thought that they'd do it for days of the month too, but no...they come out completley fine!

IMN logo majestic logo threadwatch logo seochat tools logo