I am SURE it must be my old eyes, but I can't find the function to convert CURRENT_DATE (or any of the other date functions to a string. (I need to create a string that looks like:
CURRENT_DATE + ' thru ' + MONTH_ADD(CURRENT_DATE,3)
Thanks
Bruce
(and I will polish my glasses when someone shows me where I missed this in the documentation)
Date to String Function
Re: Date to String Function
and, as SOON as I post a question, I then find the results. (I was looking in date functions for some sort of Date to String function), but, of course, as I read further down, the AS_STRING function does JUST what I want!
(Might need bifocals!)
(Might need bifocals!)
Re: Date to String Function
BTW, I am sure the rest of you much smarter kids, figured out that you can pass a format string to the AS_STRING function (even though it does not say it in the documentation), so I can type "AS_STRING(CURRENT_DATE, 'MM/dd/yyyy') to change the format.
But again, I know everyone else already figured this out before me...
Bruce
But again, I know everyone else already figured this out before me...
Bruce
Re: Date to String Function
Hey Bruce, thanks for posting this like 3 years ago! saved my Monday morning! after scouring the documentation to change date format for an export and coming up empty, I thank you for posting this!BLOMASKY wrote:BTW, I am sure the rest of you much smarter kids, figured out that you can pass a format string to the AS_STRING function (even though it does not say it in the documentation), so I can type "AS_STRING(CURRENT_DATE, 'MM/dd/yyyy') to change the format.
But again, I know everyone else already figured this out before me...
Bruce