convert String to DateTime in Reports

Stimulsoft Ultimate discussion
Post Reply
fabiorme
Posts: 1
Joined: Fri Sep 16, 2016 9:45 am

convert String to DateTime in Reports

Post by fabiorme »

Hello,
You have no idea how can I convert a string in the following format: "yyyy-MM-DDThh: mm" & "MM-ddTHH:mm" in a date,
because I can not format it for my report in pdf, in c # Razor I format it this way:

var departureDateTime = DateTime.ParseExact(data.DepartureDateTime, "yyyy-MM-ddTHH:mm", System.Globalization.CultureInfo.InvariantCulture);
var arrivalDateTime = DateTime.ParseExact(data.ArrivalDateTime, "MM-ddTHH:mm", System.Globalization.CultureInfo.InvariantCulture);

you can do a similar thing in Stimulsoft Reports?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: convert String to DateTime in Reports

Post by HighAley »

Hello.

Yes, you could use such code or any other c# expression in the report.
You could read more in the User Manual.

Thank you.
Post Reply