Print this page
Wednesday, 05 February 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

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

Read 10015 times Last modified on Wednesday, 05 February 2014 10:58