I’ve got a Crystal Report (2011) that uses a Stored Procedure to display some data. One of the fields is TimeSpent (bigint) and it holds the number of Ticks in a TimeSpan (in C#, we pass TimeSpan.Ticks to the DB to be stored).
Obviously on my report I wouldn’t want to show this, so I am wondering how I can convert ticks to read dd:hh:mm:ss, e.g. 01:05:58:25 for 1 day, 5 hours, 58 minutes and 29 seconds?
A tick is 100 nanoseconds, or 10 million ticks per second. So first convert to seconds
numbervar span := {field.ticks}/10000000;From there, just break the seconds down into time pieces (This snippet is from tek-tips):