Extract the month from a date

Bonjour,
Besoin d’aide.
Je souhaiterais extraire le mois d’une date en utilisant la formule substr(${birthday_child},0,2)

Merci

Bonjour,
Si vous utilisez date type, vous pouvez appliquer le format-date function
https://getodk.github.io/xforms-spec/#fn:format-date

1 Like

@idrikabore, you could do it as outlined by @wroos as shown in the image shared below:

In the survey tab of your xlsform:

Image 1

Data entry screen as seen in Enketo:

Image 2

Reference xlsform:

Date.xlsx (16.7 KB)

Merci de votre aide.

1 Like