on 07-16-2013 4:22 PM
Hi All,
I need to change the date in IDT(information design tool) my source is SQL.Here i am getting the date formate as 2013-04-08 00:00:00.000 need to convert mm/dd/YYYY.
Thanks,
Praveen Yagnamurthy.
Hi Praveen
You can also try with
convert(date,<your date object>)
If your object is date1 which gives the value 2013-04-08 00:00:00.000
New object date2 = CONVERT(VARCHAR(10),date1,110)
gives mm/dd/yyyy format.
Also please refer http://www.w3schools.com/sql/func_convert.asp
Thanks
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen
Try using below logic with equivalent SQL server functions and see if it helps.
to_date(Replace(to_date(trunc(datetime object),'yyyy-mm-dd'),'-','/'),'mm/dd/yyyy')
Thanks
Mallik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
9 | |
9 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.