Format date inside an expression

Stimulsoft Reports.JS discussion
Post Reply
terje.pedersen
Posts: 80
Joined: Thu Aug 18, 2016 7:29 am

Format date inside an expression

Post by terje.pedersen »

Trying to format date inside an expression but only getting 2017-02-08T00:00:00Z

Is this correct? Or do I need to transform the date first?

Code: Select all

{Format("{0:dd.MM.yyyy}",invoices_Data.CustomerInvoiceInvoiceDate)}
terje.pedersen
Posts: 80
Joined: Thu Aug 18, 2016 7:29 am

Re: Format date inside an expression

Post by terje.pedersen »

Found the solution, setting the field to datetime it was parsed in from json as string. And you also need to use "..." and not '...' as first parameter of Format()
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Format date inside an expression

Post by Alex K. »

Hello

Thank you for the information.
Please let us know if you need any additional help.

Thank you.
Post Reply