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]

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


From   "Mendoza Aldana, Dr Jorge Antonio (WPRO)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: FW: working with date & time variables when time refers to 01jan1960
Date   Mon, 7 May 2012 07:51:32 +0800

Dear Nick,
Thanks indeed, I will look at it more carefully.
Cheers,
Jorge

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: 04 May 2012 14:12
To: [email protected]
Subject: Re: st: FW: working with date & time variables when time refers to 01jan1960

This is prominently documented. You are expected to read the help!

Look at -help dates and times- and specifically the -clock()- function first.

Nick

On Fri, May 4, 2012 at 6:26 AM, Mendoza Aldana, Dr Jorge Antonio
(WPRO) <[email protected]> wrote:

> 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.

*
*   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/




====================================================
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