{"action":"opened","issue":{"url":"https://api.github.com/repos/patriksimek/node-mssql/issues/215","labels_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/215/comments","events_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/215/events","html_url":"https://github.com/patriksimek/node-mssql/issues/215","id":108774848,"number":215,"title":"Date returns as DateTime","user":{"login":"skilbjo","id":1145927,"avatar_url":"https://avatars.githubusercontent.com/u/1145927?v=3","gravatar_id":"","url":"https://api.github.com/users/skilbjo","html_url":"https://github.com/skilbjo","followers_url":"https://api.github.com/users/skilbjo/followers","following_url":"https://api.github.com/users/skilbjo/following{/other_user}","gists_url":"https://api.github.com/users/skilbjo/gists{/gist_id}","starred_url":"https://api.github.com/users/skilbjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skilbjo/subscriptions","organizations_url":"https://api.github.com/users/skilbjo/orgs","repos_url":"https://api.github.com/users/skilbjo/repos","events_url":"https://api.github.com/users/skilbjo/events{/privacy}","received_events_url":"https://api.github.com/users/skilbjo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-29T00:55:20Z","updated_at":"2015-09-29T00:55:20Z","closed_at":null,"body":"Hi,\r\n\r\nI have this query, (clearly formatting the `Date` column as a `Date`, yet in the resultset, I get back a `Datetime`. How can I convert in the query request or in the response that I want a `Date`?\r\n\r\nQuery\r\n````\r\ndeclare @start as date , @end as date , @now as date;\r\n\r\nset @now\t= getdate()\t\t\t\t\t\t-- Today\r\nset @end\t= dateadd(d,-3,@now)\t-- Yesterday\r\nset @start\t= dateadd(d,0,@end)\t-- Yesterday minus one\r\n\r\nselect\r\n    cast(txn.PostDate_R as date) as Date ,      \r\n    sum(txn.amount) Txn_Amount\r\nfrom                      \r\n    Database.Schema.Table txn \r\nwhere          \r\n      txn.PostDate_R between @start and @end            \r\ngroup by\r\n     cast(txn.PostDate_R as date)\r\n````\r\n\r\nCode\r\n````\r\nvar runQuery = function(sql, file, cb) {\r\n\tvar connection \t= new mssql.Connection(db_config, function(err) {\r\n\t\tif (err) console.log(err);\r\n\t\tvar r = new mssql.Request(connection);\r\n\t\tr.input('Date', mssql.Date);\r\n\t\tr.output('Date', mssql.Date);\r\n\t\tr.query(sql, function(err, results){\r\n\t\t\tif (err) console.log(err);\r\n\t\t\tconsole.log(results);\r\n\r\n\t\t\tsaveCSV(results, file, cb);\r\n\t\t});\r\n\t});\r\n};\r\n````\r\n\r\nResult\r\n````\r\n[ { Date: Thu Sep 24 2015 17:00:00 GMT-0700 (PDT),\r\n    Txn_Amount: 394.17},\r\n  etc...\r\n]\r\n````"}}