on 12-13-2013 2:05 PM
Hi there,
Could you please help me on below.
I have 2 fields in my source table:
Login time(varchar)
Logout time(varchar)
I am trying to calculate the difference of both times.
eg:
Login time : 09:17:53
Logout time: 09:53:40
Difference is: 00:35:27
Can anyone help me..
Thanks
Mohan
hi,
try this
lpad( interval_to_char( END_TIME-START_TIME,'HH'),2,0)||':'|| lpad( interval_to_char( END_TIME-START_TIME,'MI')%60,2,0)
||':'||lpad( interval_to_char( END_TIME-START_TIME,'SS')%60,2,0)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Resolved..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Easiest way, use this in a SQL transform - SQL Server Forums - Time Subtraction
Else, if you have little time then use substr() and Index() to split it into three and subtract and concatenate later.
Thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.