mercredi, 05 février 2014 10:53

Convert a Midas datetime to SQL

Share this post

This Scalar-valued function return a real datetime from a Midas datetime. In midas, the date is the number of day since 1971-12-31.

ALTER FUNCTION [dbo].[udf_DateMidasToSql]
(
	@Days		int
)
RETURNS datetime
AS
BEGIN

RETURN dateadd(day, @Days, '1971-12-31')

END
Lu 23480 fois Dernière modification le mercredi, 05 février 2014 10:58