Date with th rd st or nd Help
I have a form that needs to be in this date format - 4th of February 2022. It needs to have the "th" "nd" "st" or "rd" after the day. I found a formula that will allow this for today's date. However, I need the form user to be able to select the day - and not prefill with today's date.
Here is the script for today's date:
var oDate = new Date();var sDay = util.printd("d", oDate);var aSuffix = ["", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st"];var sDD = sDay + aSuffix[+sDay];event.value = (sDD + util.printd(" of mmmm, yyyy", oDate)).toUpperCase();
I tried to fix it by entering this into the validation instead - but it's not pulling in the orinary number now:
var oDate = new Date();var aSuffix = ["", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st"];var sDD = sDay + aSuffix[+sDay];event.value;
I honestly know nothing about Javascript and try to just fudge my way through it. Would someone be able to help me please?
