Cognito-forms – Months and weekdays in localized language

cognito-forms

I would like to use Cognito Forms to output the weekday of a calculated date in a specific language. However, when I use the formula DateTime.Today.DayOfWeek for example, it will always give me the day of the week in English, not in the language I have set in the form settings.

Is there some way I can make the form display a localized day of the week?

Best Answer

Dates and numbers are automatically localized in Cognito Forms whenever they are converted to text using the country and language settings for your form. The following example shows how to convert dates into localized text showing the day of the week and the month of the year.

Builder View

enter image description here

The Actual Form

enter image description here

Our help documentation on date calculations includes comprehensive examples for formatting dates and times as text:

https://www.cognitoforms.com/support/48/calculations/datetime-calculations