There is table in SQL-Server 2008 R2. In this table I have date column with date format like this 2006-09-08 14:39:41.000. Now I make a view from this table on GeoServer side and do nothing with the date field. And make WMST layer.

When I go into Layer Preview I do not see any features. I then take source table and publish it on GeoServer, but GeoServer does not see date column.

In the GeoServer docs I see that in WMST I have to use the ISO-8601 time format.

How can I convert date format in view on GeoServer?


I make some tests.

I take Shapefile with date field (i.e. 2002-08-20) put it into SQL-Server using ogr2ogr. SQL-Server says that my date field is date data type. GeoServer says it too, and in Layer Preview I see my features and after adding in address line TIME=2002-08-21 parameter I can see features with other dates.

Then I added a datetime field in my table and put into dates like 2002-08-20 GeoServer says that it's Timeswap datatype. In Layer Preview I DON'T GET any features added and TIME=2002-08-21T14.00.00.0Z also doesn't not help.

When I click on map I get error that can't convert varchar into datetime.

  • Not sure but you need to convert few things. Please check following link stackoverflow.com/questions/1509977/…
    – Sunil
    May 13, 2013 at 6:07
  • @Sunil: So you mean that i gonna have dates in seconds format like this 2312009?
    – Kliver Max
    May 14, 2013 at 5:41
  • Yes. you need to convert and then check the result
    – Sunil
    May 14, 2013 at 7:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.