Reformat the Birthday
  • 31 Jul 2023
  • 1 Minute to read
  • Dark
    Light

Reformat the Birthday

  • Dark
    Light

Article Summary

How to Reformat the Birthday Value

The OneRoster standard format for birthDate is yyy-mm-dd. Use the following expression to reformat the a user's birthdate based on a target application's specific need

function() {
    const bday = SRC.birthDate[0];

    if (bday && typeof bday === 'string') {
        const bdaySplit = bday.split('-');

        return bdaySplit[1] + '/' + bdaySplit[2] + '/' + bdaySplit[0];
    }

    return ''
}


Was this article helpful?