Skip to main content
Microsoft Dynamics GP forum

RW_DatetoString function does not appear to be working

editSubscribe (0) ShareShare
Posted on by 9,140


After finding different blogs on displaying dates in any format, I have attempted to use the RW_DatetoString function in the RM Statement on Blank Paper report in Dynamics GP 2018 with no luck.

This is the calculation (The FUNCTION SCRIPT (  is there, my window doesn't open up big enough to show it).


And my result is literally mmddyyyy:


I have tried with the date fields RM Statement Header Temp - Date, RM Statement Transaction Temp - Document Date, RM Open File - Document Date.  All with the same result.

What am I doing wrong?



  • Heather Roggeveen Profile Picture
    Heather Roggeveen 9,140 on at
    RE: RW_DatetoString function does not appear to be working


    I tried your suggestion with the same result.  So I thought, maybe I will just try DDMMYYYY (i.e. use capitals) - turns out, the case matters and that has done what I needed it to do.

    Thanks for the suggestion - that, combined with a fresh head made me try something different!



  • Verified answer
    Almas Mahfooz Profile Picture
    Almas Mahfooz 10,956 UG Leader on at
    RE: RW_DatetoString function does not appear to be working

    Try  like        




    ddd                  = day of week as 3 letters

    dddd                = day of week in full

    N                      = day of year

    NN                    = day of year (padded)

    D                      = day of month

    DD                   = day of month (padded)

    M                     = month of year

    MM                   = month of year (padded)

    mmm                = month of year as 3 letters

    mmmm             = month of year in full

    YY                    = year of date (2 digits)

    YYYY               = year of date (4 digits)

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans