[EpiData-list] Manipulation of Date and hour

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Mar 13 17:44:57 CDT 2007


There was a recent discussion on the listserve. This is very easy to do 
in Analysis, since it treats dates as a number.

define mindiff ########
mindiff = mac-mar + 60*(hac-har + 24*(dac-dar))
define hrdiff ######
hrdiff = trunc(mindiff/60)

You should verify the values of your fields, as this formula will accept 
dates and times that do not make sense.

Jamie
epidata-list at lists.umanitoba.ca wrote:
> I would like to know how to manipulate dates and hours at the same time.
> I have a data base which I seized under Epidata Entry and who understand variables dates and the hour of entrance for the delivery and date and the hour for the delivery.
> The hour I made two numeric variables, the hour and minutes.
> Now how to make  to have the difference in the hour or in minutes?
> The problem does not settlewhen the delivery with place the same day. But the problem when there is gap
> For example:
> DAR      Date of arrival      <10/01/2007>
> HAR      Arrival time      13
> MAR      Minute of arrival      45
>
> DAC      Dates delivery      <12/01/2007>
> HAC      Hour of delivery      02
> MAC      Minutes of delivery      34
>
> Under SPSS, the manipulation is easy, I would like to know if under Epidata Analysis we can do the same with these temporal data. Should the opposite occur it would be necessary to think of introducing this module into the final version of this magnificent software.
>  
> ___________________________________________
>   Dr Jean-Paul DIBY-KONAN
>   Médecin Santé Publique
>   MCM Santé de la Reproduction
>   Institut Médecine Tropicale
>   Kapucinessenstraat 8 B-2000 Anvers
> Belgique
>
>
> ----- Message d'origine ----
> De : "epidata-list-request at lists.umanitoba.ca" <epidata-list-request at lists.umanitoba.ca>
> À : epidata-list at lists.umanitoba.ca
> Envoyé le : Mardi, 13 Mars 2007, 18h10mn 43s
> Objet : EpiData-list Digest, Vol 41, Issue 7
>
> Send EpiData-list mailing list submissions to
>     epidata-list at 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 at lists.umanitoba.ca
>
> You can reach the person managing the list at
>     epidata-list-owner at 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:
>
>    1. deleted and excluded records (epidata-list at lists.umanitoba.ca)
>    2. Re: deleted and excluded records (epidata-list at lists.umanitoba.ca)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 13 Mar 2007 08:16:27 +0100 (CET)
> From: epidata-list at lists.umanitoba.ca
> Subject: [EpiData-list] deleted and excluded records
> To: <epidata-list at lists.umanitoba.ca>
> Message-ID:
>     <52289.130.226.78.129.1173770187.squirrel at webmail.webhosting.dk>
> Content-Type: text/plain; charset=iso-8859-1
>
> Continued discussion on this topic:
>
> The suggested solution I gave could be clarified:
>
> 1. Dates before year approx. 1700-1800 give problems in Analysis now, but
> obviously should not. Although as everyone probably know there is a shift
> around 15xx (I do not remember the exact year).
>
> 2. The suggestion:
> "SUGGESTION: Would it not be possible for Analysis to assign a standard
> valid value (e.g. 01/01/1900) to any invalid dates it comes across
> during the read process.  "
>
> Will be used in the next build of analysis, since it is very easy to
> implement. Obviously with a message to the user.  I think this can be done
> in 5 minutes of work time in the programming, whereas the optimal solution
> of showing variable/field name and record is a large job - could be 1-2
> days of work, since the function controlling the date value is not knowing
> neither the name of the field nor the record. But I will add the issue to
> the work plan for a solution at some point.
>
> Regarding the "excluded" versus "deleted" is also easy. The user can
> control whether records deleted are read or not by:
> set read deleted=on
> set read deleted=off
>
> The change works only when reading the file, so if you change re-read the
> file again. e.g.
> set read deleted = off
> read myfile
> describe age
> set read deleted = on
> read myfile /close
> describe age             // here records marked for deletion are included.
>
> off is default. There is an error in v1 b68 in relation to this setting,
> such that if you read the file with "set read deleted=off" and then do an
> "update", you will see the records marked for deletion. The error has been
> found and a solution will be shown in next test release.
>
> regards
> Jens Lauritsen
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 13 Mar 2007 09:43:23 +0200
> From: epidata-list at lists.umanitoba.ca
> Subject: Re: [EpiData-list] deleted and excluded records
> To: epidata-list at lists.umanitoba.ca
> Message-ID:
>     <44e66f9b0703130043t1911363ev728eaea2e245ef85 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Thanks for the quick response to my email.
>
> I would just like to clarify my suggestion re "excluded" and "deleted"
> records.  The issue is not about whether one can control reading
> deleted records or not (as Jens' response implies).  My point was that
> if one is not aware that records have been deleted, it would be more
> informative on reading the dataset in Analysis if the message
> specifically states that x records have been deleted (and are
> therefore excluded).  Using the word "excluded" suggests that Analysis
> has a problem with some values and therefore has excluded the records.
>  One could spend quite some time trying to identify the problem before
> realising that these are merely records that have been deleted.
>
> On the point of deleted records, is there some way in Analysis of
> identifying records which had been deleted (but which one has chosen
> to include in the analysis).  In EpiInfo, there was a system variable
> RECDELETED.  Also, in browse/update mode, deleted records were
> identifiable by an asterisk.  This was very useful in trying to sort
> out why records had been deleted.
>
> Thanks again,
> Annemieke van Middelkoop
>
>
> ------------------------------
>
> ________________________________________
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
>
>
> End of EpiData-list Digest, Vol 41, Issue 7
> *******************************************
>
>
>
>
>
>
>
> 	
>
> 	
> 		
> ___________________________________________________________________________ 
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
> Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
> http://fr.answers.yahoo.com
> _______________________________________________
> EpiData-list mailing list
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
>
>
>   



More information about the EpiData-list mailing list