Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要从两列计算以分钟或小时为单位的方差。使用 datediff(hh,start,stop) 有时会很大,而使用 datediff(mi,start,stop) 有时会很小。我怎样才能让它显示为 hh:mm?谢谢!
SELECT {fn TRUNCATE(DATEDIFF('mi',start,stop)/60,0)} || ':' ||{fn MOD (DATEDIFF('mi',start,start) ,60)} From MySchema.MyTable