Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm used

SQL
convert(varchar(10),'29/05/2014' ,106)


but it's not working
Posted
Updated 10-Jun-15 20:36pm
v2

1 solution

Yeah, it will not , the expression should be in datetime format to convert.
it will work,because getdate() is Datetime.

SQL
select convert(varchar(14),Getdate() ,106)


So, please convert your Date format into Datetime Format before you proceed.
SQL
select convert(varchar(14),convert(datetime,'29/05/2014',103) ,106)
 
Share this answer
 
v2
Comments
Member 10992268 11-Jun-15 2:53am    
King Fisher

thankz alot..............
King Fisher 11-Jun-15 2:58am    
np. :)
Member 10992268 11-Jun-15 3:45am    
:( , thankz for your rply :)
King Fisher 11-Jun-15 3:52am    
:), where are you from?

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