web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Date data type issue

(0) ShareShare
ReportReport
Posted on by 436

Hey everyone,

There is a small requirement that I have created a table along with some fields. I have one date field in it. I want that whenever I select date from this field there should be only year drop down and not having month and days. How can I do that?

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Can you try this? If it helps you

    field(DateField; FORMAT(rec."New Date Field", 0, ''))
                        {
                            ApplicationArea = all;                        
                        }

  • Muhammad Anas Naeemi Profile Picture
    436 on at

    Hey Nitin, thank you for responding but it is not working.

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    You have to show two fields on the page one field where you will select the Date and in other one it will show the Year of that date. but what you are asking it not possible.

     field(DateField; FORMAT(rec."New Date Field", 0, ''))
                        {
                            ApplicationArea = all;                        
                        }
                        field(DateField2; rec."New Date Field")
                        {
                            ApplicationArea = all;
                        }

  • Muhammad Anas Naeemi Profile Picture
    436 on at

    Okay Nitin. Thank you.

  • Muhammad Anas Naeemi Profile Picture
    436 on at

    One thing more I want to ask. How can we limit number of digits in an integer datatype field.

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    You can try with MinValue, MaxValue, ValuesAllowed property of that field.

  • Suggested answer
    YUN ZHU Profile Picture
    102,927 Super User 2026 Season 2 on at
    Hi, sorry for the late reply, I hope the following information can give you some help.
    Dynamics 365 Business Central: Select the only Year (Month or Day) when entering dates(Only year drop)
     
    Thanks
    ZHU

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 566 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 347 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 327 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans