Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Birthdate field and how to show just Month/Day not year

(0) ShareShare
ReportReport
Posted on by

Hello,

I have a "Birthdate" field that is date only.  How can I get it so that this field shows just the Month/Day  and not the year?  Any help is appreciated.  Thank you.

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 9,150 Super User 2024 Season 1 on at
    RE: Birthdate field and how to show just Month/Day not year

    Hello Buddy,

    This is not possible OOB Date field, But you can still implement your requirement by using below workarounds.

    1. Create 2 Single line of text field and get input one as Day and another as month from the User and use this input.

    2. Create 2 drop down fields 1 for Month and 1 for Days, but the issue will be w.r.t to this solution is leap year. Because in leap year there are 29 days in February and so to show the day field values you will need to know the Birth year.

    Thank you,

    Amit Katariya

  • Pawan Upadhyay Profile Picture
    Pawan Upadhyay 60 on at
    RE: Birthdate field and how to show just Month/Day not year

    Hi,

    Follow below steps if u want to show it on UI :

    Try creating new EDT by extending transdate and set dateYear to None.

     pastedimage1652433103011v1.png

  • Verified answer
    Nya Profile Picture
    Nya 29,058 on at
    RE: Birthdate field and how to show just Month/Day not year

    Hi,

    You can't do that - there is no such type of data for it. But you can create a field whose data type is single line of text. And then extract the month and day from the birthdate to the custom field.

    The code is something like:

    var dateFieldValue= Xrm.Page.getAttribute('birthdate').getValue();
    var month = dateFieldValue.getMonth() 1;
    var day = dateFieldValue.getDate();
    var dateFormat = month   "-"   day;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans