Format DateTime in Expression (MVC Designer)

Stimulsoft Reports.WEB discussion
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Format DateTime in Expression (MVC Designer)

Post by romulocpd »

Hello,

To format a currency value, in format from my country, I can use:

{(Dados.Valor).ToString("###,###,##0.00")}

I'm trying format a DateTime Value (the value is showing with time lik 00:00:00)

{(Dados.DataVencimento).ToString("dd/MM/yyyy")}

If I put it, the system returns INTERNAL ERROR.
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Re: Format DateTime in Expression (MVC Designer)

Post by romulocpd »

I found the TextFormat on Designer and choose Date Format (dd/mm/yy).

The value is being printing: 07/05/2014 00:00:00 yet......
Any tips?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Format DateTime in Expression (MVC Designer)

Post by Alex K. »

Hello,

Can you please send us a sample report which reproduce the issue for analsysis.

Thank you.
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Re: Format DateTime in Expression (MVC Designer)

Post by romulocpd »

In attach.

In mrt file:

<TextFormat Ref="31" type="DateFormat" isKey="true">
<StringFormat>dd/MM/yyyy</StringFormat>
/TextFormat>

Result:
Error example
Error example
error dateformat stimulsoft.png (31.49 KiB) Viewed 3883 times
Thank you!
Attachments
ContasPagarGeralFornecedor.mrt
Report
(33.58 KiB) Downloaded 244 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Format DateTime in Expression (MVC Designer)

Post by Alex K. »

Hello,

In your datasource the DataVencimento column is string, there may be some problems with the automatic conversion to datetime. please try to change on DateTime type.

Thank you.
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Re: Format DateTime in Expression (MVC Designer)

Post by romulocpd »

Hello.

Yes, you're correct. Now it's running great!

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Format DateTime in Expression (MVC Designer)

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Re: Format DateTime in Expression (MVC Designer)

Post by romulocpd »

I have other doubt: at end of the trial periodo, what happens with the tool and projects? The Stimulsoft stops to work or the message DEMO is always showed unless I buy the product?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Format DateTime in Expression (MVC Designer)

Post by HighAley »

Hello.

Our trial period is unlimited in time and have no any limitation except DEMO watermark.

Thank you.
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Re: Format DateTime in Expression (MVC Designer)

Post by romulocpd »

Great! Very good.
Post Reply