brendanbell

OLEDB Enterprise Date Format

Discussion created by brendanbell on Aug 14, 2013
Latest reply on Aug 14, 2013 by michaelh

I am writing queries against our AF database using Transpose Functions. When I use a date literal as a parameter/filter on my queries, the date is interpreted as 'DD/MM/YYYY' but being in the USA, I want the date interpreted as 'MM/DD/YYYY'

 

Is there a server setting I can set this?  Or a function I can specify my input date format?

 

Here is an example query: 

 
SELECT
elementT.[StationName],
elementT.[UnitNumber],
'SCADA' as source,
elementT.EngineStatus_SCADA,
elementT.time
FROM  [Reliability].[Asset].[ElementHierarchy] element
 INNER JOIN [Reliability].[DataT].[ft_TransposeInterpolateRange_CompressionUnit] elementT
       ON elementT.ElementID = element.ElementID
WHERE 
 element.level = 3
 AND ParentName(element.path)='Banner'
 AND elementT.StartTime = Date('8/12/2013') 
 AND elementT.EndTime = DATE('8/13/2013') 
 AND elementT.TimeStep = '10m'

 

Outcomes