By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,272 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

Convert to local date/time when page is rendered?

P: n/a
I realize that methods like DateTime.ToLocalTime() and DateTime.ToUniveralTime() exist.

But suppose one wants to query out data from a database that has UTC times in it.
Suppose one wants to have a DataGrid with BoundColumn rows that are dates and times.
Can one somehow in specifying the formatting for a date column say "date the bound
date and treat it as UTC and convert it to PST when the page is rendered"?

Or does one have to go thru the dataset and do date math on every date column in
every row before doing the DataBind() call?

I'm not even sure whether the database I'm using (MySQL) thinks it is handing me UTC
dates. But I just found out that the data feed I've got comingi in is providing UTC
dates and I'm going to have customers in a few different time zones wanting to look
at forms in theirr time zones.
Dec 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.