Remove time from DATETIME format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can someone tell me what the best way to remove the time from a datetime
field in a database? I know I could use LEN but I was just wondering if there
is a better way to do it?


E.G: 8/30/2004 12:00:00 AM

Should return 8/30/2004

Thanks for the advice!
 
If you mean storing the date part only in the database (MSSQL?), I don't
think you can. A datetime field will always contain time, that's what it's
made for. If you mean formatting a string in the code, look at datetime
format expressions, there is plenty to choose from.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top