Date and Time questions

I

Ivan Demkovitch

1. How do I display median (AM, PM)
I use code like:
ToString("MMMM, dd yyyy hh:mm") to format DateTime

2. I get UTC time. I know time zone (i.e. hours offset). How do I display
time properly taking into account Daylight savings?

Thanks!
 
A

Adrian Mascarenhas

1. How do I display median (AM, PM)
I use code like:
ToString("MMMM, dd yyyy hh:mm") to format DateTime

See DateTimeFormatInfo class. See http://msdn.microsoft.com/library/d...GlobalizationDateTimeFormatInfoClassTopic.asp
it has a format pattern of "t" or "tt" for specifying AM/PM.

eg. ToString ("h:mm tt") will give you "9:30 AM".
2. I get UTC time. I know time zone (i.e. hours offset). How do I display
time properly taking into account Daylight savings?

msdn is really slow right now, sorry i cant get the answer to this question.

--
Adrian Mascarenhas, Developer Division

This posting is provided "AS IS" with no warranties, and confers no rights.

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top