Date Formatting
Posted: Tue Aug 30, 2011 9:55 pm
I tried to format the time to show AM/PM.....but not sucessful. Will custom formatting work ?
Reporting tool and data analytics tools for creating reports and dashboards in ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, and Java applications.
https://forum.stimulsoft.com/
Please, try to use this format maskfkmfkm wrote:I tried to format the time to show AM/PM.....but not sucessful. Will custom formatting work ?
Code: Select all
hh:mm tt
Code: Select all
{YourDataSource.YourTextField.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"))}
Code: Select all
using System.Globalization;
hh:mm tt works...Aleksey wrote:Hello.Please, try to use this format maskfkmfkm wrote:I tried to format the time to show AM/PM.....but not sucessful. Will custom formatting work ?If it is don't work then try to use this expressionCode: Select all
hh:mm tt
In order to make it work, please, addCode: Select all
{YourDataSource.YourTextField.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"))}
in code tab.Code: Select all
using System.Globalization;
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?fkmfkm wrote:but how come the Time formattting does not work...It will cut down your support a lot if it works...
I mean when i select Time format and Properties "*11:56 AM"; it does not show the AM/PM ...Aleksey wrote:Hello.Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?fkmfkm wrote:but how come the Time formattting does not work...It will cut down your support a lot if it works...
Thank you.
It will appear if you choose right localization.fkmfkm wrote:I mean when i select Time format and Properties "*11:56 AM"; it does not show the AM/PM ...
Code: Select all
{YourDataSource.YourTextField.ToString("hh:mm:ss tt", CultureInfo.CreateSpecificCulture("en-US"))}