Page 1 of 1

convert String to DateTime in Reports

Posted: Fri Sep 16, 2016 9:53 am
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?

Re: convert String to DateTime in Reports

Posted: Fri Sep 16, 2016 10:56 am
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.