Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: date checking ???

RE: date checking ???

From: Anderson, Brian <andersob_at_darton.edu>
Date: Thu, 21 Aug 2003 07:01:21 -0800
Message-ID: <F001.005CBF99.20030821070121@fatcity.com>


>From a sql perspective, you want to trunc(now), to get rid of the time.

As for how to do this in java, I don't know.

> -----Original Message-----
> From: Andrea Oracle [mailto:andreaoracle_at_yahoo.com]
> Sent: Wednesday, August 20, 2003 6:49 PM
> To: Multiple recipients of list ORACLE-L
> Subject: date checking ???
>
>
> Hi all,
>
> May I ask a javascript question?? (sorry to post
> here!) below is a form checking input date. The input
> date cann't be earlier than today. But it also
> compares hours and minutes which I don't want.
> Suppose you input 08/20/2003, it thinks it's
> 08/20/2003 00:00:00 which is earlier than now
> (08/20/2003 15:30:00). How to solve this?? Thank you!
>
> <html>
> <head>
> <script>
> function validate(){
> var obj = document.forms("shipping");
>
> //$$ sending date cannot be earlier than today
> now = new Date();
> sDate = obj.p_sending_date.value;
> sDate = sDate.substring(0,2) + "/" +
> sDate.substring(3,5) + "/" + sDate.substring(6,10);
> inputDate = new Date(sDate);
> if (inputDate < now) {
> alert("Sending date cannot be earlier
> than today.");
>
> }else{
> alert("ok");
> }
> }
> </script>
> </head>
> <body>
> <form name="shipping">
> <input type=text name="p_sending_date">
> <input type=submit value="submit"
> onClick="validate();">
> </form>
> </body>
> </html>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Andrea Oracle
> INET: andreaoracle_at_yahoo.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Anderson, Brian
  INET: andersob_at_darton.edu

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Aug 21 2003 - 10:01:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US