Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: FW: working with date & time variables when time refers to 01jan1960


From   "Mendoza Aldana, Dr Jorge Antonio (WPRO)" <MendozaAldanaj@wpro.who.int>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: FW: working with date & time variables when time refers to 01jan1960
Date   Fri, 4 May 2012 13:26:33 +0800

Dear Statalist,
I've received a dataset containing date (date1 and date2) and time (time1 and time2) variables; time1 is the time on date1 when an event happened; the same for time2 and date2. 
I need to compute the difference in minutes between date1_time1 to date2_time2. But, the format of time1 and time2 is e.g. "01Jan1960 10:20:00". 

the data looks like below,

date1       time1               date2      time2
05may2010   01jan1960 10:00:00  05may2010  01jan1960 10:40:00
10may2011   01jan1960 23:50:00  11may2011  01jan1960 00:30:00

So, I need to find a way to calculate the difference in minutes, which in the examples above is 40 minutes.
I am using Stata 11 on Windows XP.
I would appreciate ideas or links to references on how to solve this.
Jorge





====================================================
This message was scanned for viruses with Trend Micro ScanMail, GFI MailSecurity and  GFI MailEssentials by the World Health Organization Regional Office for the Western Pacific.  However, the recipient is advised to scan this e-mail and any attached files for viruses.

Disclaimer:

This e-mail, together with any attachments, is intended for the named recipients only and is confidential. It may also be privileged or otherwise protected by law.

If you have received it in error, please notify the sender immediately by reply e-mail and delete it and any attachments from your system. You may not copy or disclose its contents to anyone.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index