Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Oct 20, 2010 08:09 PM|LINK
In my database when anyone registers - By default the registration time is saved as UTC universal time zone.
But i want to display everything on the website in (GMT-05:00) Eastern Time (US & Canada)
I am using this SQL QUERY to display registration date:
SELECT TOP (5) Username, CustomerID, RegistrationDate = CONVERT(VARCHAR(12),RegistrationDate,107) FROM Customer ORDER BY RegistrationDate DESC
And, i am displaying it like this:
<asp:Label ID="nameLabeldate" runat="server" Text='<%# Eval("RegistrationDate") %>' />
The problem is the output is getting displayed as : 10/20/2010 1:36:01 PM
I know RegistrationDate is datetime stamp that's why i am getting output in this format.
But i want to display RegistrationDate as: Oct 20, 2010 at 1:36pm -> according to (GMT-05:00) Eastern Time (US & Canada) ORDER BY RegistrationDate in Desc (top most will be last registered user)
I need help with sql query by which i should be able to accoplish my desired output..please help...