March 3, 2008 at 12:38 pm
I am using an Analysis Services data base as my source for a report and I can't seem to get dates formated properly. When my data comes over from the SSAS db my date data isn't even displayed as a datetime it looks like this ex(21491169.498614). I would like it to display just the time portion of the date.
Cheers,
Michael
March 3, 2008 at 7:54 pm
I want to preface my comment by stating that I know nothing about Analysis Services.
First, when you run the query outside RS or in the DataSource tab are you seeing an actual date or the numeric value?
Second, what you are seeing is probably the actual way SQL Server stores dates and the data to the right of the decimal is the time portion.
You could do this:
Select
Convert(datetime, datetime_col - Convert(int, datetime_col)) as time_only
TO get just the time portion if I am correct about what you are getting back for a value. I question that because the value you give as an example is too large to be a valid date in SQL Server. It evaluates to greater than the year 9999.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply