0

I need to format datetime that comes from MS Access to "m-d-yyyy" using odbc in C#.net( desktop app). "Select Format([Date],'M-d-yyyy') from table" does not work.

Thanks, Kanaya

4

2 回答 2

0

I may be over simplifying this but:

m-d-yyyy

won't work as Days/Months can have up to two digits, what you need is:

mm-dd-yyyy
于 2012-07-19T14:29:20.593 回答
0

尝试

Select convert(char, [Date], 101) 
于 2012-07-19T13:11:04.533 回答