Hi,
I need to display in my app the birthday but without the years.
I use the Date Format plugin but it is not in the localised format (french)
Is there a way to do it ?
Thanks
Hi,
I need to display in my app the birthday but without the years.
I use the Date Format plugin but it is not in the localised format (french)
Is there a way to do it ?
Thanks
I used JavaScript for this.
function formatDateTimeTZ(datetimeString) {
// Step 1: Parse the datetime string into a Date object
const date = new Date(datetimeString);
// Step 2: Set the locale to French and format the date
const options = {
day: '2-digit',
month: 'long',
year: 'numeric', // Include year to ensure correct date interpretation
timeZone: 'UTC' // If needed, adjust the timezone
};
// Step 3: Format the date
const formattedDate = date.toLocaleDateString('fr-FR', options);
// Extract only "DD MMMM" from the formatted string
// The formatted string includes the year, so we need to remove it
const parts = formattedDate.split(' ');
const day = parts[0];
const month = parts[1];
return `${day} ${month}`;
}
return formatDateTimeTZ(p1)
With p1 being your “Birthday” column.
Thank you but I’m on a Legacy Free
JavaScript is available on free plan.
Ho yes, I’ve just found it
Thank you
Please, give the Solution mark to Thin! Not to me.
It is probably because of UTC time conversion. What is your timezone?
I’m in France
There we go All good then?
We will see tomorrow
Good to see
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.