I am creating an internal reference number using the CONCAT function and the date forms part of this. I need to convert a Custom Date field into an all numerical format of YYYY/MM/DD. If this is possible in a Calculated Field in a Custom Form this would great for any help!
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
To format a date field into a calculated field in this way, you would have to build this yourself, "from scratch".
I recommend you start this by going through the calculated data expressions page.
In particular, look up functions like "year", "month" and "dayofmonth". For the final restriction, look at the "case" function. Feel free to share your work back to this group as I know folks are always interested in looking at each other's solution.
edited to add: I ran this through copilot, and it suggests "if the length of your month or day = 1, add a zero" as an alternative to "case", so -- your call.
I have got a calculated field to manipulate a date. The Months and Days that pull are single digit for example May appears as '5' or the first of the month appears as '1'.
I would like these single digit dates to appear as two digit so 1st May would appear as 01/05.
This is the expression - can it be two digit?:
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You just have to remove the first part of the calculation that pulls the Year and switch the placement of the Month and Day.
It'd be something like this:
CONCAT(DAYOFMONTH({DE:UKI - Campaign Start Date}),"/",MONTH({DE:UKI - Campaign Start Date}))
Views
Replies
Total Likes
Ohh I think I see what you're asking for. My calc above will give you 1/5 but not 01/05.
You''d have to insert logic in the expression to evaluate the month and date. If the month is less than 10 then you'd have an expression that concats "0" in front of month. Same thing for Day of the Month.
Views
Replies
Total Likes
Hi Justin - any idea on the calculation for this?
Views
Replies
Total Likes
moving this one back under your original post. Try using CASE or IF(LEN).
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies