[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: how to compare dates



Anne,
I have always used the less than or equal / greater than or equal to. I have
also had problems in the past where I have had to format the date as
'yyyy/mm/dd' so it does the comparison correctly. Below is an example of how
it would be setup in a where clause. However you can do the same type of
comparison in a conditional statement. I hope it works out for you.

where $doc_date >= '2002/01/01'
  and $doc_date <= '2002/04/30'

Tim

-----Original Message-----
From: Andalib Yussuf [mailto:andalib.yussuf@AMS.COM]
Sent: Thursday, July 25, 2002 12:59 PM
To: SQR-USERS@list.iex.net
Subject: how to compare dates


Hello,
I was wondering how you can compare dates. For instance in SQL there is a
between function. How do I say

$doc_date  is between  '01/01' and '04/30'

I would appreciate your help in this matter.

Thank You

Anne

CONFIDENTIALITY NOTICE

This message and any included attachments are
from Cerner Corporation and are intended only
for the addressee. The information contained
in this message is confidential and may
constitute inside or non-public information
under international, federal, or state securities
laws. Unauthorized forwarding, printing, copying,
distribution, or use of such information is
strictly prohibited and may be unlawful. If
you are not the addressee, please promptly
delete this message and notify the sender of
the delivery error by e-mail or you may call
Cerner's corporate offices in Kansas City,
Missouri, U.S.A at (+1) (816)221-1024.
----------------------------------------- -