Hello, and thank you both for your response. (*^-^) Solution:
"DateColumn" > TIMESTAMP '2009-01-30 23:25:00' I wasn't aware of the TIMESTAMP operator. Using it solved my problem and I can now filter by date range. ( ^O^)/ Thanks for your time! Darren _____ From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Kenneth Skovhede, GEOGRAF A/S Sent: February 3, 2009 12:41 AM To: MapGuide Users Mail List Subject: Re: [mapguide-users] SQL datetime trouble I have found the FDO "TIMESTAMP" command to works for me: "DateColumn" > TIMESTAMP '2009-01-30 23:25:00' It might not work on all providers though. Regards, Kenneth Skovhede, GEOGRAF A/S Traian Stanev skrev: This is more of a workaround than a solution to the problem, but. You can try to make some expression that converts the date to a string of the form YYYY-MM-DD and then write your filter as a string comparison. You can compare dates in this format using simple string comparisons (lexicographical order matches chronological order). Traian From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Darren Karasiuk Sent: Monday, February 02, 2009 2:09 PM To: mapguide-users@lists.osgeo.org Subject: [mapguide-users] SQL datetime trouble Hello, I've been trying to use MapGuide OS and have been able to show a themed layer when I filter by the unique row id and equipment id. Instead of using row IDs, I need to filter the data by date and time ranges. So far, when ever I use a datetime field to filter, the entire database is returned. I assume if the filter isn't correct then it's nulled and no filter gets applied, so that's why I get the entire database. Can anyone tell me the correct method of filtering a layer by a date range, please? I've been using Map Guide Studio trial from Autodesk and tried many different ways of filtering using ToDate() and Extract() with no luck. I couldn't find any filtering information with the FDO. I'm using SQL Server 2008. The table has both lat and long fields as well as its respective geospatial field. Thanks for any help! Darren _____ _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users