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)

Date format

(0) ShareShare
ReportReport
Posted on by

i need to convert this format to string 15-jun-10 any help

*This post is locked for comments

I have the same question (0)
  • Crispin John Augustine Profile Picture
    37,081 on at

    mthName(mthOfYr(YourDate)) will give you month Name,

    concat that with dayOfMth(YourDate) and year(YourDate)

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    "to convert this format to string 15-jun-10" makes no sense, because it's the string that has a format.

    Did you mean converting a date to a string in this format, or converting a string in this format to date?

  • Community Member Profile Picture
    on at

    i have date as parameter 01-Jan-2010  and when i use it in select statement there is no data retrieved    when i remove the date from select it will run correct

    this is my select

     while select  AccountNum from vendtable  group by vendtable.AccountNum,dirPartyTable.name

          join vendtrans where vendtable.AccountNum ==vendtrans.AccountNum

          join dirPartyTable  where    dirPartyTable.RecId ==vendTable.Party

           && vendtrans.TransDate >=_parm.ParmFromDate()

           && vendtrans.TransDate <=_parm.ParmToDate()

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    Date values have no format; "01-Jan-2010" is how it looks like after converting to text and the same value may be displayed in a different format for different users (if they use different regional settings). Understanding this difference is critical.

    If the type of ParmFromDate() and ParmToDate() is date, you don't need any conversion. It seems that you don't have any data fulfilling the condition.

    If the type is string, you should change it to date.

  • Community Member Profile Picture
    on at

    Thank you Martin Dráb

  • Community Member Profile Picture
    on at

    when i convert date2str it run and data type  of ParmFromDate() and ParmToDate() is date

    while select  AccountNum from vendtable  group by vendtable.AccountNum,dirPartyTable.name

         join vendtrans where vendtable.AccountNum ==vendtrans.AccountNum

         join dirPartyTable  where    dirPartyTable.RecId ==vendTable.Party

          && vendtrans.TransDate >=str2date(01/01/2015)

          && vendtrans.TransDate <=_str2date(01/01/2018)

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    I'm sorry, but I don't understand what you're saying.

    If the type is date, no conversion is needed. Also, you said you used date2str(), but your code shows str2date() (where you're passing date literals instead of strings, so it makes no sense).

  • Suggested answer
    startax Profile Picture
    1,845 on at

    Hi,

    Change your parm method use transedate EDT instead of String.

    Can you share your parm method code.

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    Yes, if he uses string (which he didn't confirm), he should switch to date. I already suggested that above.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans