Thank you Jens. It worked perfectly with minor change, as I was looking for EntryClient as below,
DateAIDS AFTER ENTRY DateAIDS=DateDiag1 IF (DateDiag2 < DateAIDS) THEN DateAIDS=DateDiag2 ENDIF IF (DateDiag3 < DateAIDS) THEN DateAIDS=DateDiag3 ENDIF IF (DateDiag4 < DateAIDS) THEN DateAIDS=DateDiag4 ENDIF IF (DateDiag5 < DateAIDS) THEN DateAIDS=DateDiag5 ENDIF IF (DateDiag6 < DateAIDS) THEN DateAIDS=DateDiag6 ENDIF IF (DateDiag7 < DateAIDS) THEN DateAIDS=DateDiag7 ENDIF END END
I tested, works just fine. THANK YOU!!!
Bijay
On Sat, Sep 10, 2011 at 11:00 AM, epidata-list-request@lists.umanitoba.cawrote:
Send EpiData-list mailing list submissions to epidata-list@lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit http://lists.umanitoba.ca/mailman/listinfo/epidata-list or, via email, send a message with subject or body 'help' to epidata-list-request@lists.umanitoba.ca
You can reach the person managing the list at epidata-list-owner@lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list ___________________________________
Today's Topics:
- How to select earlier date from multiple dates (epidata-list@lists.umanitoba.ca)
- Re: How to select earlier date from multiple dates (epidata-list@lists.umanitoba.ca)
Message: 1 Date: Fri, 9 Sep 2011 14:34:44 -0600 From: epidata-list@lists.umanitoba.ca Subject: [EpiData-list] How to select earlier date from multiple dates To: epidata-list@lists.umanitoba.ca Message-ID: <CAEHHyTmiNvCm7zPcw+vtxBu2U8biViuecby-OG37jikcg1XG1w@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1
Dear Forum Members,
I was looking a way to select earliest date from multiple date fields. Example,
Five date fields with dates as below, DateA - 13/01/2002 DateB - *13/01/2001* DateC - 13/01/2002 DateE - 13/01/2003 DateF - 13/01/2004
So, the programming to select earliest date (13/01/2001) in the field called "DateDiagnosis"
Thanks in advance.
Bijay Adhikari, PhD CD Epidemiologist Regina, SK
Message: 2 Date: Fri, 09 Sep 2011 22:50:12 +0200 From: epidata-list@lists.umanitoba.ca Subject: Re: [EpiData-list] How to select earlier date from multiple dates To: epidata-list@lists.umanitoba.ca Message-ID: 4E6A7C04.9070701@epidata.dk Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 2011-09-09 22:34, epidata-list@lists.umanitoba.ca wrote:
Dear Forum Members,
I was looking a way to select earliest date from multiple date fields. Example,
Five date fields with dates as below, DateA - 13/01/2002 DateB - *13/01/2001* DateC - 13/01/2002 DateE - 13/01/2003 DateF - 13/01/2004
So, the programming to select earliest date (13/01/2001) in the field
called
"DateDiagnosis"
I have not tested this solution, but I would do something like:
I assume this is in analysis: define datetmp <dd/mm/yyyy>
datetmp = datea if (dateb < datetmp) then datetmp = dateb if (datec < datetmp) then datetmp = datec if (dated < datetmp) then datetmp = dated if (datee < datetmp) then datetmp = datee if (datef < datetmp) then datetmp = datef if (dateg < datetmp) then datetmp = dateg
- now the datetmp contains the earliest of the dates mentioned.
regards Jens Lauritsen EpiData Association
EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list
End of EpiData-list Digest, Vol 95, Issue 8