Date / Time formatting

Stimulsoft Reports.Flex discussion
Locked
User avatar
Chipo
Posts: 44
Joined: Thu Sep 13, 2012 4:09 am
Location: Sydney, Australia

Date / Time formatting

Post by Chipo »

Hi,

how can I format date / time in the report

for example
date: Friday, 07 December 2012
time: 18:30 (06:30 PM)

Best regards.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Date / Time formatting

Post by HighAley »

Hello.
Chipo wrote:how can I format date / time in the report

for example
date: Friday, 07 December 2012
time: 18:30 (06:30 PM)
You could set format with C# syntax http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
In your case it will be look next:

Code: Select all

{Today.ToString("dddd, dd MMMM yyyy")}
{Time.ToString("HH:mm (hh:mm tt)")}
Also you could use Text Format property of the text component.
Look at the attached report template.

Thank you.
Attachments
Report.mrt
(3.32 KiB) Downloaded 1175 times
User avatar
Chipo
Posts: 44
Joined: Thu Sep 13, 2012 4:09 am
Location: Sydney, Australia

Re: Date / Time formatting

Post by Chipo »

Thank you. Awesome. This works.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Date / Time formatting

Post by Andrew »

Hello,

Have a great day!
Locked