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

Community site session details

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

Finding Current Half year from Input Date

(0) ShareShare
ReportReport
Posted on by 175

Hi,

'1D+CM' = one day + Current month

'1D+CY' = one day + Current year

'1D+CQ' = one day + Current quarter

How to Find current half year based on above formulas

i.e Current Half year from any input date b/w 01/01/2020 - 30/06/2020 is 30/06/2020

Current Half year from any input date b/w 28/09/2020 - 05/01/2021 is 31/12/2020

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,696 Moderator on at
    RE: Finding Current Half year from Input Date

    Hi Ali Hamza ,

    Can you please try with Calcdate('<6M>',010120D); ?

    Thanks.

  • AliHamza Profile Picture
    175 on at
    RE: Finding Current Half year from Input Date

    No, it doesn't work. If Input date is 03042020 then it fails

  • Suggested answer
    AliHamza Profile Picture
    175 on at
    RE: Finding Current Half year from Input Date

    Hi Guys,

    i found the solution:

    if DATE2DMY(InputDate, 2) < 6 then

                       OutputDate := CALCDATE('-CY+6M-1D', InputDate)

                  else

                       OutputDate := CALCDATE('-CY+12M-1D', InputDate)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,828

#2
Sumit Singh Profile Picture

Sumit Singh 2,617

#3
YUN ZHU Profile Picture

YUN ZHU 1,861 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans