 This topic has 6 replies, 5 voices, and was last updated 15 years, 4 months ago by .

Topic

What is the correct syntax for subtracting date to a previous date and changing time in a translation? For example:
20090601240014
will become
20090531235914
Thank You,
Lina Patel

 – Use clock scan to convert date1 to integer
– Use clock scan to convert date2 to integer
– Subtract the two integers
– Convert that difference to what you need for your application, as the result value will be the difference in seconds, and 60 secs/min, 60 mins/hour, etc. You might use clock format or math functions here.
Hope this helps,
Robert Milfajt
Northwestern Medicine
Chicago, IL