Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a DateTime Column Start_Date in my table 'x' and I want to update it from a Stored Procedure but with only dd-MMM-yy format.Please help.
I searched for different style numbers available like 105,106 etc but its not according to my requirement.
Posted
Comments
aarif moh shaikh 13-Oct-14 8:42am    
dd-MMM-yy is not a format

i think you want this format
dd-MM-yy
george4986 14-Oct-14 0:46am    
U cannot specify a format to save datetime in SQL,but u can select a saved date time in customized formats

1 solution

DateTime column will save time also even if you will not pass that value in insert.So, if you just want to save date then use date datatype or while fetching the record fetch record with conevrt function to get desired format else last option for you is use Varchar(10) as datatype and save in desired format.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900