Does anyone know the T-SQL to convert bigint values in the RedGateMonitor database to date and time?

 An example would be 635606749394413823 as the date value for an entry in the "Raised" field of the Alert table.
I've tried a number of suggestions and they all cause an overflow error. Thanks.


  • Options
    Russell DRussell D Posts: 1,324 Diamond 5
    edited July 16, 2020 10:51AM
    These aren't ints, they're stored in ticks, and there are two included utilities in the Monitor repository for this, Utils.TicksToDateTime and Utils.DateTimetoTicks which you can then use to convert to/from by selecting rows, eg SELECT TOP 10 utils.TicksToDateTime( CollectionDate).
    Have you visited our Help Centre?
Sign In or Register to comment.