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 :
Microsoft Dynamics GP (Archived)

Concatenating two date fields

(0) ShareShare
ReportReport
Posted on by 432

Anybody know how I can concatenate two date fields in report writer?  I tried creating a calculated field but it errors out. 

I need to concatenate the Contract start and end date on an invoice. 

Thanks,

Tina

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    KirkLivermont Profile Picture
    5,985 on at
    RE: Concatenating two date fields

    Tina,

    Use the cast function to convert the date fields into strings and then concatenate the two. I believe date fields are generally stored as date time so you may also want to strip some characters.

    Regards,

    Kirk

  • Suggested answer
    Justin Thorp Profile Picture
    2,265 on at
    RE: Concatenating two date fields

    Hi Tina,

    Kirk's advice is great if you are creating a report based on a SQL query.

    If you are using GP's "Report Writer" then I suggest you create a calculated field like the following (I'm Concatenating the same date field to itself):

    STRIP(FUNCTION_SCRIPT(RW_DateToStringPM_Paid_Transaction_HIST.Document Date"DD-MM-YYYY" )  )  # STRIP(FUNCTION_SCRIPT(RW_DateToStringPM_Paid_Transaction_HIST.Document Date"DDMMYYYY" )  )

    Note:  The "RW_DateToString" function can be found on the functions tab, with the "User-Defined" radio button selected, in the "System" core.

    Note:  The "STRIP" function can be found on the functions tab, with the "System-Defined" radio button selected.

    Note:  I've used 2 different formats in the RW_DateToString for illustration ("DD-MM-YYYY" and "DDMMYYYY")

    Note:  You can find more information about the User-Defined functions here:  blogs.msdn.microsoft.com/.../using-the-built-in-report-writer-functions

    Thanks,
    Justin

  • Verified answer
    Tina Haerr Profile Picture
    432 on at
    RE: Concatenating two date fields

    Justin,

    THANK YOU, THANK YOU, THANK YOU!

    I was able to get the two dates to concatenate and it looks GREAT!  It's exactly what I needed.  Thank you so much for responding!

  • Community Member Profile Picture
    on at
    RE: Concatenating two date fields

    Where can I find the FUNCTION_SCRIPT? 

    It is not in the system defined or user defined function options.

    Thank you

    M

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 > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans