May 5, 2011 at 7:36 am
in my table my time is showing as 2011-05-19 16;00:00:00, I can get the date showing correctly, however, how can I get my time to show as 2:00 pm EST and not 16:00?
May 5, 2011 at 7:47 am
2pm est? Are you sur it's not 4 pm est?
Something like that :
SELECT CONVERT(VARCHAR(25), CAST('2011-05-05 16:00:00' AS DATETIME), 109)
May 5, 2011 at 7:58 am
yes its showing 4 hours ahead of the time I enter so if I enter in 2 on the front end of my web app the db is storing it as 16:00 (4 hours ahead)
May 5, 2011 at 8:04 am
there must be a setting somewhere for the difference between the time saved and the "real" local time.
SELECT DATEADD(hh, -2, GETDATE())
May 5, 2011 at 8:18 am
i'm using sitefinity and so far i can't find that setting.
How can I make it work in a tabular query?
select * from
(
select content,
max(case when keyvalue like 'Title' then ShortText Else '' End) as Title,
max(case when keyvalue like 'Start_Date' then DateTimeValue Else '' End) as StartDate,
from content INNER JOIN
metadata ON content.Id= metadata.ContentID
group by contentGroup.content
) x
May 5, 2011 at 8:26 am
dateadd(hh, <find the setting>, max()).
I can't help you with the setting.
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply