create field for date

Heidibb

New Member
Hello,
I have a field in a table that includes date and time stamp :

2012-07-03 07:00:25.0

I would like to keep this field, but would like to update the table and add another field that is ONLY the date. Not quite sure how to do that.

Thoughts?

Thanks in advance
 

Peter Schmitz

Administrator
Staff member
Hello and welcome to the forum,

I would suggest using a computed column, using the following formula:

Code:
CONVERT(VARCHAR(10),<your date column>,111)

You would replace <your date column> with the name of your actual date/time column.

Let me know if that works out for you?

Peter
 
Top