June 16, 2014 at 10:29 am
I have this calculated field which shows the month of the report. Problem is that it only shows months from Jan, feb thru Dec. I am wondering if someone can help me figure out the way where it shows Month + years
For example: It shows only January for 2012, 2013 and 2014.
This is what I would like to get (January 2012, January 2013 or January 2014)
This is the syntax I am using
=MonthName(Month(Fields!Requested_Start_Date.Value))
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 16, 2014 at 11:42 am
New Born DBA (6/16/2014)
I have this calculated field which shows the month of the report. Problem is that it only shows months from Jan, feb thru Dec. I am wondering if someone can help me figure out the way where it shows Month + yearsFor example: It shows only January for 2012, 2013 and 2014.
This is what I would like to get (January 2012, January 2013 or January 2014)
This is the syntax I am using
=MonthName(Month(Fields!Requested_Start_Date.Value))
Not being familiar with SSRS it looks like you just need to concatenate a space and the YEAR value of Requested_Start_Date.
June 16, 2014 at 12:18 pm
Not being familiar with SSRS
Me Neither
it looks like you just need to concatenate a space and the YEAR value of Requested_Start_Date.
How would I do that. I mean what would be the syntax?
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 16, 2014 at 3:46 pm
Like this...
=MonthName(Month(Fields!DueDate.Value)) & " " & Year(Fields!DueDate.Value)
just change DueDate to your field name.
June 17, 2014 at 7:03 am
pietlinden (6/16/2014)
Like this...=MonthName(Month(Fields!DueDate.Value)) & " " & Year(Fields!DueDate.Value)
just change DueDate to your field name.
Thank you so much. It worked.
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 17, 2014 at 7:13 am
Try this in your SQL query then feed it into your report.
DATENAME(MONTH, Requested_Start_Date)+ ' ' + DATENAME(Year ,Requested_Start_Date) AS MonthYear
***SQL born on date Spring 2013:-)
June 17, 2014 at 7:25 am
thomashohner (6/17/2014)
Try this in your SQL query then feed it into your report.
DATENAME(MONTH, Requested_Start_Date)+ ' ' + DATENAME(Year ,Requested_Start_Date) AS MonthYear
I don't know if I am supposed to try this as it is or change any values :unsure:
This is what I got (See attachment)
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 17, 2014 at 7:29 am
On your output that's my bad when I first posted that code I tested it in my environment and left my data field in there. v.fromdate is mine, I have since edited it to your field.
***SQL born on date Spring 2013:-)
June 17, 2014 at 7:36 am
thomashohner (6/17/2014)
Try this in your SQL query then feed it into your report.
DATENAME(MONTH, Requested_Start_Date)+ ' ' + DATENAME(Year ,Requested_Start_Date) AS MonthYear
Can't try that in my query since I am using shared dataset and have no access to the DB. I am unable to make any changes in that query.
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 17, 2014 at 7:38 am
That's right, I forgot well it looks like you did get a solution from the other gent. 🙂
***SQL born on date Spring 2013:-)
June 17, 2014 at 7:52 am
This is a strange behavior. I don't know what I am missing? It is showing month+year for all the months except January: unsure:
See attachment:
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 17, 2014 at 8:36 am
New Born DBA (6/17/2014)
This is a strange behavior. I don't know what I am missing? It is showing month+year for all the months except January: unsure:See attachment:
I see what the problem is:
I deleted this calculated field (month) and added Requested_Start_Date. It is showing me null value for all the tickets which has no start_date, but when I added that month column again, it was showing me January 1 for all the NULL value. Now I have to figure out the way to fix this problem so if there is a null value, it shows something else (Blank) instead of January 1.
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
June 17, 2014 at 8:36 am
:unsure:
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply