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
Examining the Trade Potential of the UAE using a Gravity Model and a PPML EstimatorWe are estimating a PPML model for the UAE using a total of 32 exporting countries and about 200 imp…
Can I automate regression margins for a loop?Hi guys, So I'm basically making regression models for a loop of all variables and one fix variable…
Help with loopHi, Getting used to the program. I'm having some trouble with a loop. In the first column of the da…
Marginsplot with no constant - for Treatment Effect only and not Outcome value YHi there, I am running a household fixed effects model on some panel data to estimate the effect of…
data management lags leads...hello everyone i have a small dataset with diseases A, B and C which can have different severity sco…
Subscribe to:
Post Comments (Atom)
0 Response to Difficulty working with time variable
Post a Comment