Hi,
I thought I had cracked this but seemingly not:
After having trouble importing variables containing dates from an SPSS file I used -usespss- which looked to have done the trick and after formatting the variables using:
format time1 %tcHH:MM
so times are displayed (11.05, 11.15 etc) and ultimately I was looking for a duration of an appointment which I was able to calculate as time2 - time 1 which gave a third var time3 which I formatted as %tcMM so it shows a time in minutes, in this case 10 minutes.
My problem is that I want this value to behave as a 'normal' number, so I want to multiply var3, as '10' by another variable but I get really strange numbers. I've been reading the 'datetime translation' help files but can't work what I need to do. Is there a way to use/ convert this variable?
Any thoughts much appreciated.
Matt
Related Posts with Difficulty working with time variable
Venn diagramHi I'm trying to do a Venn diagram with 4 variables but the code pvenn allows only 3 variables maxim…
How to Handle Heterogeneity in Panel Data using Systems GMM approachDear Stata Users, I am currently researching on Foreign direct investment in Africa using the Syste…
Parametric survival analysis Good morning. I am doing parametric survival analysis through streg. After streg, I got the followi…
Question about diff-in-diff with multiple control groups and one treatment groupHello! I am running a Difference in Difference (DD) regression to see whether the introduction of a…
How to model "Sparial Variability" or "Choice of Location"I have a survey data on 10000 delivery person. I have number of delivery they made in 49 neighborhoo…
Subscribe to:
Post Comments (Atom)
0 Response to Difficulty working with time variable
Post a Comment