Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Comparing 2 Dates

0 views
Skip to first unread message

Arpan De

unread,
Aug 1, 2002, 11:51:43 AM8/1/02
to
Is comparing 2 dates done in the same way as 2 integers is done? For eg. I have date1 as 15/7/2002 (d/m/yyyy) and date2 as
1/4/2002 (d/m/yyyy). Is date1> date2 or date1<date2? While comparing 2 dates, is the date which comes first the smaller date & the
one which comes later is greater (similar to integers - 2 comes first & hence 2 is smaller than 3 & vice-versa)? I want to include
a date comparison criteria in the WHERE clause of a SQL statement but I don't think I am getting the correct output.

Thanks,

Arpan


Henrik Reich

unread,
Aug 1, 2002, 12:10:05 PM8/1/02
to
You can do it this way

SELECT * FROM tabel WHERE #d/m/yyyy# < #d/m/yyyy#;

I hope, i answered you question.

Henrik Reich
Digital Bygnings Data


"Arpan De" <dearp...@hotmail.com> wrote in message
news:uen6vJXOCHA.2460@tkmsftngp04...

Arpan De

unread,
Aug 1, 2002, 12:55:43 PM8/1/02
to
Hi Henrik,

Thanks for your reply. Yeah I very well know what you have shown in the SQL statement but what I want to know is whether 15/7/2002
> 1/4/2002 or 15/7/2002 < 1/4/2002? That is will the comparison be done similar to how 2 numbers are compared - the date which
comes first among the 2 dates is the smaller one & the date which comes later is greater (similar to why 2 < 3 since 2 comes first
& 3 comes after 2)?

Thank you once again,

Regards,

Arpan

"Henrik Reich" <h...@dbdata.dk> wrote in message news:OYYqkXXOCHA.1452@tkmsftngp10...
: You can do it this way

: >
: >
:
:


Phillip Windell

unread,
Aug 1, 2002, 4:26:02 PM8/1/02
to
A later Date is considered larger than an earlier Date. It is the same way
with Time.

--
Ancient Chinese Secret:
If it is really, really, hard to do, then you
are probably doing it wrong to begin with.

Phillip Windell
pwin...@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

"Arpan De" <dearp...@hotmail.com> wrote in message

news:useigtXOCHA.2420@tkmsftngp04...

0 new messages