Database Date & Time Question

Results 1 to 3 of 3

Thread: Database Date & Time Question

  1. #1
    ThankYouToAllofYourHelp Guest

    Default Database Date & Time Question

    I have a date field in the Oracle Table...I created a form that makes reservation, in my form, I have a date field and and time field. How do I point the date & time fields from my form to insert into the Oracle date field.<BR><BR>In addition, if you are aware of any resources to help writing Reservation pages, please let me know???Thank you so much for your time.

  2. #2
    Join Date
    Dec 1969

    Default RE: Database Date & Time Question

    You can try something like this:<BR><BR>&#060;%<BR>theDate = Request.Form("dateFieldOnForm")<BR>theTime = Request.Form("timeFieldOnForm")<BR>theDateTime = theDate & " " & theTime<BR><BR>SQL = "INSERT INTO table ( dateTimeField ) VALUES( &#039;" & theDateTime & "&#039; )"<BR>...<BR>%&#062;<BR><BR>But I hear that Oracle is fussy about getting its date and time in a certain format. If that is so, then dig up those docs, tell us what they say, and we can do a better job, perhaps.<BR><BR>Note that I did *NOT* validate that stuff coming from the form, so if somebody typed "Zamboni!" into the date field on the form, all hell will break loose when you do the insert. This is why validation is important.<BR><BR>

  3. #3

    Default Great...I am trying it...

    Bill, you are back from vacation. Very good, your mind is fresh again. Bill, this is my email address: please shoot me an email.<BR>Can you be a little more specific about the codes you gave me, perhaps, can you give me some validation suggestion too. Thank you Bill for your wonderful help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts