Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sql function to change multiple dateformat into one dateformat

how to change multiple dateformat into one dateformat in sql?

currently, i'm using my java code. however, I would like to change using sql function so that I don't need to consume another connection between my java program and database.

My current code is below:

--

any pointer would be appreciated

like image 781
goutthee Avatar asked Oct 30 '22 01:10

goutthee


1 Answers

Did hardcode as below but i think it's poor code :(

DECLARE @finalDate nvarchar(20) SET @finalDate = CONVERT(nvarchar(15), '2011/01'+'/01' ,100); print @finalDate;

like image 200
goutthee Avatar answered Nov 04 '22 08:11

goutthee