Author: Rohit Umarjikar
Posted: Thu Oct 20, 2016 3:01 am (GMT 5.5)
Output:
This should work for you, there is no reason to use cast unless required also why you gave ',' after each date? I thought you wanted as one string. What you posted may not be true as we don't see that is happening and just because you say so we cannot waste time on that. please try with this and let us know.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."![icon_razz.gif]()
Posted: Thu Oct 20, 2016 3:01 am (GMT 5.5)
Code: |
SELECT VARCHAR_FORMAT(CURRENT_DATE,'YYYY.MM.DD') ||'|'|| VARCHAR_FORMAT(CURRENT_DATE,'YYYY/MM/DD') || '|' FROM SYSIBM.SYSDUMMY1 |
Output:
Code: |
1 ---------------------- 2016.10.19|2016/10/19| |
This should work for you, there is no reason to use cast unless required also why you gave ',' after each date? I thought you wanted as one string. What you posted may not be true as we don't see that is happening and just because you say so we cannot waste time on that. please try with this and let us know.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
