how to convert date to text
Hi there I was wondering how do you convert 2/3/2020 (which is a date format) to 2/3/2020 ( a text format)
Best Answer
-
Hey - Can you try the below replacing "Date Format" with your date formatted line item:
TEXT(MONTH(DATE FORMAT)) & "/" & TEXT(DAY(DATE FORMAT)) & "/" & TEXT(YEAR(DATE FORMAT))
Thanks.
JT
6
Answers
-
Just thought it would be relevant to share this idea;
Would make this process a lot easier!
Best,
Callum
1 -
@CallumW I upvoted that!
Surprisingly, @jnoone suggestion is not even mentioned on the data conversion Anapedia page.
I can't tell you how often I have to make this conversion.
@Jmanaplanner46 just make sure you make that conversion in a system module. Calculate once, reuse often...
5 -
Hi @CallumW and @JaredDolich ,
I have upvoted this too!
I agree that how many times we need to do this.
It would simply things if we have a direct solution to this.
Cheers,
Yash
2 -
Hi @Jmanaplanner46 ,
Almost similar to @jnoone approach, if it is required for the date and month to be in 2 digits, I usually convert the date to number using formula
YEAR(DATE FORMAT) * 10000 + MONTH(DATE FORMAT) * 100 + DAY(DATE FORMAT), and then convert it to text format using TEXT and MID functions.
Regards,
Andre
6 -
Try using the Name(Date Line item), it will return as text.
0