How to display uppercase week day in SSRS expression - reporting-services

I am using SSRS to produce a report where I like to format the date from 20/01/2017 to FRIDAY (uppercase) instead.
=UCase(FormatDateTime(Fields!Start_Time.Value,DateFormat.ShortDate))
What I have tried:
=UCase(FormatDateTime(Fields!Start_Time.Value,"dddd"))
However, If I leave the custom field as =dddd then it displays Friday.
Question is how to convert to uppercase?!
Your help is much appreciated.
UPDATE
The correct syntax would be:
=UCase(Format(Fields!Start_Time.Value,"dddd"))
Thanks to MiguelH & Muhammad Saqlain

The correct syntax would be:
=UCase(Format(Fields!Start_Time.Value,"dddd"))
Credit goes to MinguelH

Related

Count of dates "This Month" to appear in a text box in Access Report

This seems simple but I haven't been able to find it anywhere. I just want to have a simple text box with a formula that pulls the count of dates for THIS MONTH from a specific field to populate on my Access Report.
Basically just trying to show for this month how many
Construction Starts: _______
Construction Completes: ________
Can any one help me with this?
Thanks,
Charles
As Gustav provided this code works for producing a simple value counting the number of date fields in THIS MONTH. Just adapt what is in quotes to your table/fields.
=DCount("*","YourTable","[YourDateField] Between DateSerial(Year(Date()),Month(Date()),1) And DateSerial(Year(Date()),Month(Date())+1,0)")
Could be:
=DCount("*","YourTable","[YourDateField] Between DateSerial(Year(Date()),Month(Date()),1) And DateSerial(Year(Date()),Month(Date())+1,0)")

Weird SSRS Format Date Output in Header

For one of my Matrix reports, the column headers are Dates which I am trying to format in the form of 'Mon 07' i.e. short date name followed by date value.
For this I am using the expression - =Format(CDate(Fields!WorkedOnDate.Value),"ddd")
I then wanted to trim the right 3 letters.
I am getting weird output.
Here is what I am getting for one week-
Tue, We2, T12u,ri,SaA,Sun,7on
Any idea what is going wrong?
This was asked in this link but that answer didn't help -
The date formats do not seem to work in SSRS
I realize my mistake now. I was adding the Format property across Number-> Format property of that textbox. I solved this by adding as part of the textbox Property value.

MS Access get specific field of a record

I'm really new to MS Access and got stuck a little problem which looks like i can't solve it.
Following I have a little example which makes it easier to explain.
As you can see I have a little calendar. Very easy and simple. I do a lookup on my tblCalendarMonths and on my tblCalendarYears. The field calDisplay is a calculated field an should put the Month and the Year together. In 'Picture 2' you can see how I tried it. In 'Picture 1' you can see what happens.
All I get is are the IDs of the selected Month and Year. What do I need to do,
to see under Display: "June 2014"
Thanks in advance!
Is there a reason you want to have the date separated like that in your table? If not you can use the DatePart Function to return the year and month as you desire.
DatePart("yyyy", [CalDate]) & " " & MonthName(DatePart("m", [CalDate]))

dd/mm/yyyy date format in SSRS

i'm trying to specify dd/mm/yyyy dateformat for date/time parameter in SSRS 2008 R2.
My computers datetime format is mm-dd-yyyy.
My requirement is, i want to show date format at dd/mm/yyyy irrespective of the system/server date format.
I've already tried CDate(Format(Today,"dd/mm/yyyy")) which didn't work. one very strange thing i observed is, it shows dd/mm/yyyy format only for dates on or before 12-MM-yyyy, and 13 onwards it gives error: Conversion from string '25-04-2014' to type Date is not valid. (Possibly it is trying to map 25(daypart) with MM-dd-yyyy (month part)) which is out of range of total months i.e. 12)
my research on internet says it is a bug in BIDS 2008.
What do i do to display date as dd/mm/yyyy ??
I don't have enough reputation to comment, but I did notice that you failed to put "()" after "Today". If I'm not mistaken you must put Today() for that function to work. Also, you might want to try putting CDate Around the Today() function. You shouldn't need it, but it's worth a shot. Also, for some odd reason, in my experience, you must capitalize MM for format to work correctly.
Like #Aditaya said, it should be =format(Today(),"dd/MM/yyyy")
The expression I usually use is:
=FormatDateTime(Fields!Date.Value, DateFormat.ShortDate)
However, this may be region specific.
Rather than writing an expression to do the formatting, you can also use the Textbox Format Property. But first you need to make sure that the data is in a date format. So use the CDate function on your column like this:
=CDate(Fields!Date.Value)
Then in the textbox properties go to the Number tab. Select Date for the category. Then you can select whichever format you want or use a Custom format. This will change how the column displays when you run the report.

How to get current month name in SSRS?

I need current month name as default perameter name in my ssrs report. How can I get current month name using an ssrs expression?
For example "27-09-2012" would become "September"
and one more i need....
27-09-2012 to previous month name as well (August)
First question:
=MonthName(Month(Fields!datefield.Value))
Second question:
=MonthName(Month(DateAdd("m", -1, Today())))
I think the second question answer might be something like that, first converting the date to month then subtracting 1 from the month value and then converting it to month name.
Further reading:
SSRS Reports get Month name from Month Index or from date
Converting month number to month name in reporting services
OFF: I would change the date format you are using to 2012-09-27 as it works in every setting and should give you peace of mind when converting date formats.
Don't subtract 1 b/c it won't work for January.
Use this:
MonthName(Month(DateAdd("m", -1, CDate(Today))))
As a note, I tried the suggestion of =MonthName(Month(today())). What I would get is #error for whatever field the expression was in. However, =MonthName(str(Month(today()))) worked for me. I am unsure of whether or not the MonthName method changed to require a string or if it is some issue with my program. Just figured I would post this in case anyone else was having the same issue.
For Previous Month i found universal way : =MonthName(Month(CDate(Today()))-1,False) for SEPTEMBER (Full Month Name) 'OR'
=MonthName(Month(CDate(Today()))-1,True) for SEP (Short Month Name)