Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

select part of date (gg-mm-yyyy) from ODBC canonical (121)

$
0
0
I stored datetimes in a large table with odbc canonical format. So I want to extract fields that match only a part of a date, in italian format. Date in rows: 2012-07-13 14:58:00.000, 2012-07-13 14:03:00.000, 2012-07-11 08:54:00.000 and so on... Date to find: 13-07-2012 (gg-mm-yyyy) I can do the search by doing, for example: SELECT * FROM DATABASE.dbo.MyTable WHERE CONVERT(datetime,CAST(myDateTimeField AS date),105) = CONVERT(datetime,CAST('13-07-2012' AS date),105) It's simple, ok, but c

Viewing all articles
Browse latest Browse all 12198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>