Minute to HH:MM conversion

Stimulsoft Reports.WEB discussion
Post Reply
Kwan
Posts: 4
Joined: Thu Jan 07, 2010 9:19 am
Location: Bangkok

Minute to HH:MM conversion

Post by Kwan »

I use version 2007.2 and used this code to convert minutes stored as integer to HH:MM

,(Select convert(varchar(5), crmActivity.NetTime/60)+':'+convert(varchar(2), crmActivity.NetTime%60)) AS DisplayTime

But if the value does not have minutes left (e.g., NetTime = 60), I get a value of 1:0. How do I get it show as 1:00?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Minute to HH:MM conversion

Post by Jan »

Hello,

You can use following expression:

Code: Select all

{Today.ToString("HH:mm")}
Thank you.
Post Reply