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: Coverting variable to date and time
From
Neophytos Stylianou <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Coverting variable to date and time
Date
Fri, 24 May 2013 10:45:40 +0000
Nick I have some more questions about time and date.
I have read through the help file but it is not clear to me what is the difference of %tc and %tC
I have converted my data to YMDhms and it works
Just for my practise I have also split the variable and converted the two splits into date and time variable form strings
I have entries for the same date but for morning as well as afternoon.
How will I separate them in AM and PM?
Is it something like:
Gen time2= AM if time1 >=00:00:00 & time1<=12:00:00
Replace time2=PM if time1>12:00:00 &time1<00:00:00
Thnaks
Neo
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: 24 May 2013 11:00
To: [email protected]
Subject: Re: st: Coverting variable to date and time
That is no problem: it is in many ways the easiest and best way to import dates and/or times into Stata.