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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

str2date returns 2011 when passing date 22/06/10

(0) ShareShare
ReportReport
Posted on by

transdate fromdate ,noholdingfromdate ;

int  finOpenYr ;

 

 

 fromdate=22/06/10

 

 finOpenYr =  year(_FromDate); //it returns 2010

noholdingfromdate = str2date('31-MAR' + int2str(finOpenYr),123); but this code returns 31-MAR-2011

 

Pls help i want it should return  noholdingfromdate =31-MAR-2010 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohamed Amine HAMDAOUI Profile Picture
    540 on at

    Hello,

    You can use this code, it works fine in my computer :

        noholdingfromdate = str2date(strfmt('31-MAR-%1',finOpenYr),123);

    Best regards,

    Mohamed Amine

  • Community Member Profile Picture
    on at

    thanks it is working

  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    You can also just use mkDate(31, 3, 2010) function

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans