Page 1 of 1

Date Formatting

Posted: Tue Aug 30, 2011 9:55 pm
by fkmfkm
I tried to format the time to show AM/PM.....but not sucessful. Will custom formatting work ?

Date Formatting

Posted: Wed Aug 31, 2011 2:15 am
by HighAley
Hello.
fkmfkm wrote:I tried to format the time to show AM/PM.....but not sucessful. Will custom formatting work ?
Please, try to use this format mask

Code: Select all

hh:mm tt
If it is don't work then try to use this expression

Code: Select all

{YourDataSource.YourTextField.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"))}
In order to make it work, please, add

Code: Select all

using System.Globalization;
in code tab.

Thank you.

Date Formatting

Posted: Wed Aug 31, 2011 3:34 am
by fkmfkm
Aleksey wrote:Hello.
fkmfkm wrote:I tried to format the time to show AM/PM.....but not sucessful. Will custom formatting work ?
Please, try to use this format mask

Code: Select all

hh:mm tt
If it is don't work then try to use this expression

Code: Select all

{YourDataSource.YourTextField.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"))}
In order to make it work, please, add

Code: Select all

using System.Globalization;
in code tab.

Thank you.
hh:mm tt works...

but how come the Time formattting does not work...It will cut down your support a lot if it works...

Date Formatting

Posted: Wed Aug 31, 2011 7:03 am
by HighAley
Hello.
fkmfkm wrote:but how come the Time formattting does not work...It will cut down your support a lot if it works...
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.

Date Formatting

Posted: Wed Aug 31, 2011 10:58 pm
by fkmfkm
Aleksey wrote:Hello.
fkmfkm wrote:but how come the Time formattting does not work...It will cut down your support a lot if it works...
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
I mean when i select Time format and Properties "*11:56 AM"; it does not show the AM/PM ...

Date Formatting

Posted: Thu Sep 01, 2011 5:09 am
by HighAley
Hello.
fkmfkm wrote:I mean when i select Time format and Properties "*11:56 AM"; it does not show the AM/PM ...
It will appear if you choose right localization.
Please, use this code in your application.

Code: Select all

{YourDataSource.YourTextField.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"))}
Please, see the attached report template.

Thank you.