Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: date checking ???
Question of this sort is best to be asked on one of JavaScript
forums:
comp.lang.javascript microsoft.public.scripting.jscript
getDate() method of Date object returns date integer, meaning you can easily test if inputDate is less than today, but to avoid possible trouble - you must check and compare all date parts:
if ( inputDate.getDate() < now.getDate() | inputDate.getMonth()< now.getDate() | inputDate.getYear() < now.getYear() ) {
Branimir
> -----Original Message-----
> From: Andrea Oracle [mailto:andreaoracle_at_yahoo.com]
> Sent: 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!
>
> inputDate = new Date(sDate);
> if (inputDate < now) {
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Branimir Petrovic INET: BranimirP_at_cpas.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).Received on Thu Aug 21 2003 - 10:00:38 CDT
![]() |
![]() |