Hi,
I am trying to make a script that returns the difference between a given date and time to current date and time.
Given date and time is in this format 1991-09-26 and 23:10:10
The only thing I found that seems to do this thing is clock scan but a can't get it to work.
If you have any idea how to do this please feel free to write back.
Gorby wrote:Hi,
I am trying to make a script that returns the difference between a given date and time to current date and time.
Given date and time is in this format 1991-09-26 and 23:10:10
The only thing I found that seems to do this thing is clock scan but a can't get it to work.
If you have any idea how to do this please feel free to write back.
set date 1991-09-26
set time 23:10:10
puts "Converting $date $time"
set clocksecs [clock scan "$date $time"]
puts "Clock seconds: $clocksecs"
set check [clock format $clocksecs -format "%Y-%m-%d %H:%M:%S"]
puts "Back conversion: $check"