|
|
|
start date: Mon, 23 Jul 2007 12:34:06 -0700,
posted on: microsoft.public.dotnet.framework.compactframework
back
| Thread Index |
|
1
elena
|
|
2
ctacke/ ctacke[at]opennetcf[dot]com
|
|
3
elena
|
Date/Time format question
Hi, All
I need to convert short time to long time and display it w/o seconds
I don't want to use this -> FormatDateTime(dt, DateFormat.LongTime)
it return seconds
here is example:
dt.ToString("MM/dd/yyyy HH:mm") it displays short time
Is it possible to display long time w/o seconds
dt.ToString("hh:mm ...PM/AM ?")
i need result something like - 01:35 PM
Please, advise
Date:Mon, 23 Jul 2007 12:34:06 -0700
Author:
|
Re: Date/Time format question
According to the docs* you use 'tt', so it would be:
dt.ToString("MM/dd/yyyy hh:mm tt"); // note the lower case hh
*= http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
"elena" wrote in message
news:19063984-6498-4A6C-9BE3-964CF081E96D@microsoft.com...
> Hi, All
> I need to convert short time to long time and display it w/o seconds
> I don't want to use this -> FormatDateTime(dt, DateFormat.LongTime)
> it return seconds
> here is example:
> dt.ToString("MM/dd/yyyy HH:mm") it displays short time
> Is it possible to display long time w/o seconds
> dt.ToString("hh:mm ...PM/AM ?")
> i need result something like - 01:35 PM
>
> Please, advise
Date:Mon, 23 Jul 2007 14:57:37 -0500
Author:
|
Re: Date/Time format question
Thank you for the references,
"<ctacke/>" wrote:
> According to the docs* you use 'tt', so it would be:
>
> dt.ToString("MM/dd/yyyy hh:mm tt"); // note the lower case hh
>
> *= http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Managed Code in an Embedded World
> www.OpenNETCF.com
>
>
> "elena" wrote in message
> news:19063984-6498-4A6C-9BE3-964CF081E96D@microsoft.com...
> > Hi, All
> > I need to convert short time to long time and display it w/o seconds
> > I don't want to use this -> FormatDateTime(dt, DateFormat.LongTime)
> > it return seconds
> > here is example:
> > dt.ToString("MM/dd/yyyy HH:mm") it displays short time
> > Is it possible to display long time w/o seconds
> > dt.ToString("hh:mm ...PM/AM ?")
> > i need result something like - 01:35 PM
> >
> > Please, advise
>
>
>
Date:Mon, 23 Jul 2007 13:12:01 -0700
Author:
|
|
|