Hi: I am new to Reporting Services.
My issue is that I have a Date-Time Field which I want to use as a column heading for a crosstab. However since there are multiple date entries with varying times I get multiple column headings. Could anyone tell me how to convert this datetime field to a date field so that I only get one column per day.
ThanksThere are are number of VB.Net functions for manipulating dates which you
could use for this.
The simplest (but probably not most efficient) way would be to convert the
date to a string then back to a date: =CDate(CStr(Fields!DateTime.Value))
You might want to consider doing the conversion in your query instead.
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
news:F6AFC614-180B-4C75-94B8-DB3149275D3D@.microsoft.com...
> Hi: I am new to Reporting Services.
> My issue is that I have a Date-Time Field which I want to use as a column
heading for a crosstab. However since there are multiple date entries with
varying times I get multiple column headings. Could anyone tell me how to
convert this datetime field to a date field so that I only get one column
per day.
> Thanks
Showing posts with label crosstab. Show all posts
Showing posts with label crosstab. Show all posts
Thursday, March 29, 2012
Wednesday, March 7, 2012
convert seconds in timeformat(hh:mm:ss) in crosstab crystal report
hi,
I am displaying time in seconds in crosstab crystal report , I want to show it in time format(hh:mm:ss),Pls help me,it is very urgentI replied here
http://forums.belution.com/en/crystal/000/060/35.shtml
I am displaying time in seconds in crosstab crystal report , I want to show it in time format(hh:mm:ss),Pls help me,it is very urgentI replied here
http://forums.belution.com/en/crystal/000/060/35.shtml
Friday, February 10, 2012
Convert date to quarter
I'm fairly new to crystal, and I have a crosstab that list columns by a date field, and groups the date by quarter. In the header of each column, crystal displays "1/2007 ..... 4/2007...... 7/2007..... etc (its displaying the first month of the quarter). I want to convert that header from the month/year to 1Q07......2Q07.....3Q07...etc, or something similar that identifies the quarter and year. Any ideas? I cant find a function and can't come up with forumula to do this. Im sure this is an easy question for most :)Create 2 formulas: the 1st one for the quarter and the second one to get your desired result:
1. @.Quarter
if month({table.date})<=3 then '1' else
if month({table.date})>=4 and month({table.date})<=6 then '2' else
if month({table.date})>=7 and month({table.date})<=9 then '3'
else '4'
// it's not necessary to place it in the report area
----
2. @.nQYY
{@.Quarter}+'Q'+right((totext(year({table.date}),0)),2)
Use this formula in your crosstab to list the columns by it, I mean instead of your {table.date} field.
1. @.Quarter
if month({table.date})<=3 then '1' else
if month({table.date})>=4 and month({table.date})<=6 then '2' else
if month({table.date})>=7 and month({table.date})<=9 then '3'
else '4'
// it's not necessary to place it in the report area
----
2. @.nQYY
{@.Quarter}+'Q'+right((totext(year({table.date}),0)),2)
Use this formula in your crosstab to list the columns by it, I mean instead of your {table.date} field.
Subscribe to:
Posts (Atom)