DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us