Alastair:  you're right, I did ask that question.  I haven't gotten to that 
part yet.  So you're saying that the integer is meaningless??  It isn't the 
number of seconds or some such thing?   Is what Bill saying right, and the 
integer depends on what my time setting is?   And yes, my datetimes can be > 
24 hours between.

So let's say I have 2 DateTime variables.   How do I get the time between 
those 2 datetimes?  Preferably I want to get it in "minutes" but obviously I 
can work with whatever I have.

You're saying that I need to subtract the 2 datetimes and then use your 
ADDSEC to the result to get seconds?  Could I do the same thing to get minutes? 
 And this works when it's over 24 hours?

Karen


In a message dated 10/16/2012 1:44:31 PM Central Daylight Time, 
[email protected] writes: 
> Karen,
>   
>  You have had some answers about the SETting of the variable but you also 
> sneaked in a comment about subtracting one date/time from another.
>   
>  You’re right, as far as I know, you get an integer which is correct but 
> meaningless <g>.
>   
>  However, you can convert that number into a time using the ADDSEC 
> function:
>   
>  SET VAR vNoNoneSenseTime = (ADDSEC(‘0:00:00’, .vYourResult)
>   
>  As long as it is less that 24 hours you’re fine. If not you have to work 
> out the days first! And, guess what? You can use the ADDDAY function almost 
> the same way!
>   
>  By the way, you can use a negative value for the second component to 
> subtract time or days.
>   
>  I am sure I must have said it here before but these are my most used and 
> most loved R:Base functions. If the time ones would go beyond the 24 hour 
> mark they’d be even better. (We all say things like “give it 48 hours”.)
>   
>  Regards,
>  Alastair.
>   
> 
> 
>

Reply via email to