Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

i have a requirement in which i have to get time difference of two timestamp in hours and than later find an average of the hours.

i am using below query to find difference of two timestamp but it does not give exact result it gives approx result. do we have any other solution to achieve the same.My two time stamps are as( LAST_MODIFIED_DATETIME - 2016-11-30 15:39:01.131 CREATE_DATETIME - 2016-07-01 17:25:52.375)

select timestampdiff(8, char(LAST_MODIFIED_DATETIME-CREATE_DATETIME)) as total_time from test_table where name='some name';
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
845 views
Welcome To Ask or Share your Answers For Others

1 Answer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...