Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change date format into DD/MM/YYYY. And One more thing is that, how to change integer value into date format.

Like - input : 11122014
output : 12-NOV-2014
Posted
Comments
Arjsrya 29-Dec-14 4:41am    
Do you want to do in the SQl server of c#?
Bittu14 29-Dec-14 6:06am    
Oracel developer software.

Hi,

Please refer the following link where the formating of the date is wel described.
Date Formatting in Sql

Thanks
Sisir Patro
 
Share this answer
 
Comments
Bittu14 30-Dec-14 3:03am    
Thanks Sisir.
[no name] 30-Dec-14 3:56am    
WC
I'd suggest to use to_date()[^] and to_char()[^] functions to get proper date:

SQL
SELECT to_date(to_char(11122014), 'dd/mm/yyyy') As MyDate
 
Share this answer
 
Comments
Bittu14 30-Dec-14 2:56am    
Thanks Marciej Los
Maciej Los 30-Dec-14 16:05pm    
You're very welcome ;)
Hi,
Try this following :

SQL
select convert(varchar(11), cast(yourDate as date), 106) from Table


thanks
 
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