Date queries for layers coming from various data formats

Discussion created by sivetic on Sep 13, 2010
I need to build date queries JS on data coming from a variety of sources (could be SDE - SQL, DB2, Oracle, FGDB, etc).  Depending on the data source, the date query differns.  For example, querying SQL ends up being DateColumn = '2010-09-13' where FGDB is DateColumn = date '2010-09-13'.  My problem though is that I don't know the type of data source ahead of time.  My current workaround is to use ArcObjects to figure out what the data is coming from.  The workaround works fine for now, but I a) want to get away from using ArcObjects if possible and more importantly b) it doesn't work if the map is coming from an external ArcGIS Server. 

Anyone have suggestions as to how I could find out the type of the data source or the format of the date query without using ArcObjects?