Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 19,053 of 19,505    |
|    Erland Sommarskog to Tony Johansson    |
|    Re: How to remove the time part from a f    |
|    15 Mar 14 17:31:49    |
      From: esquel@sommarskog.se              Tony Johansson (johansson.andersson@telia.com) writes:       > In this method GetBokningar I fetch all rows and return a DataSet but I       > hope I can remove the time part in some way. Now I get for example       > format 2013-03-12 00:00:00 for columns BokningFromDate and BokningToDate       > because these are DateTime column in the database. I could use a       > DataReader and convert to string but I hope I can fix it within sql in       > some way.              Presentation issues are best done in the UI, but you could use the data       type date throughout in the database. Or you could do              convert(date, BookingFromDate)                     --       Erland Sommarskog, Stockholm, esquel@sommarskog.se              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca