I've get value "SDFE12:56" from database, but in my report, i only want to show 12:56 under the colume Time. Is there a way to do that? I've already tried by Ctime()function. but it seems not working
thanks
try val function
val(SDFE12:56)
if you want check link
In the same lay as your other question
Mid ("SDFE12:56",4 ,5 )
or because it is at then end you can do
Mid ("SDFE12:56",4)
Related
I am a bit new with SSRS, I need to do a conditional formatting in SSRS, where if the last_backup_date is less than 3 days, the column will be "Yellow" and if it is less than 7 days, then the column will be "Red"... I can't figure out how to do this. Any help would be appreciated. I tried using Switch function but just can't figure out which Date & Time function to use here. Thanks in advance
Try using this:
=Switch(
DATEDIFF(DateinterVal.Day,Fields!last_backup_date,Today())<3,"Yellow",
DATEDIFF(DateinterVal.Day,Fields!last_backup_date,Today())<7,"Red"
)
UPDATE: Adding an additional condition based on comments.
=Switch(
DATEDIFF(DateinterVal.Day,Fields!last_backup_date,Today())<3,"DarkGreen",
DATEDIFF(DateinterVal.Day,Fields!last_backup_date,Today())<=7,"Yellow",
true,"Red"
)
Let me know if this helps.
I am trying to calculate the amount of days between two dates but my formula doesn't seem to be working properly. It's as is the function is ignoring the years in the dates. My function is as follows:
=IF([Today's date]>[Expiration Date],-DATEDIF([Expiration Date],[Today's date],"d"),(DATEDIF([Today's date],[Expiration Date],"d")))
I receive this error if I use the above function(Owners removed):
But then I replace -DATEDIF([Expiration Date],[Today's date],"d") with -DATEDIF([Today's date],[Expiration Date]"d") i get this result:
This is telling me that both cases are being treated as IF([Today's date]>[Expiration Date] even though 3/24/2015 is clearly larger than 11/03/2014. Can somebody please tell me what I'm doing wrong? Thanks.
=[ExpirationDate] - [TodaysDate]
I have month parameter in JasperReports report which will be changed into title of month. I didn't use any query to change them. I try this code:
$P{MONTH}.intValue()==1?"JAN":
$P{MONTH}.intValue()==2?"FEB":
$P{MONTH}.intValue()==3?"MAR":
$P{MONTH}.intValue()==4?"APR":
$P{MONTH}.intValue()==5?"MAY":
$P{MONTH}.intValue()==6?"JUN":
$P{MONTH}.intValue()==7?"JUL":
$P{MONTH}.intValue()==8?"AUG":
$P{MONTH}.intValue()==9?"SEP":
$P{MONTH}.intValue()==10?"OCT":
$P{MONTH}.intValue()==11?"NOV":"DEC";
but it didn't work. Could anyone know the solution for me?
This is what I use
$F{MONTH}.intValue()==1?"JAN":
$F{MONTH}.intValue()==2?"FEB":
$F{MONTH}.intValue()==3?"MAR":
$F{MONTH}.intValue()==4?"APR":
$F{MONTH}.intValue()==5?"MAY":
$F{MONTH}.intValue()==6?"JUN":
$F{MONTH}.intValue()==7?"JUL":
$F{MONTH}.intValue()==8?"AUG":
$F{MONTH}.intValue()==9?"SEP":
$F{MONTH}.intValue()==10?"OCT":
$F{MONTH}.intValue()==11?"NOV":"DEC"
It may be the semi-colon at the end that's the problem
It may also be that you are using a Parameter - .intValue() doesn't seem valid for a Parameter
Can someone please shed some light on why when I create a date object I receive the wrong month like so:
new Date("2013-11-25").getMonth()
output> 10
new Date("2013-11-25").toISOString()
output> 2013-11-25T00:00:00.000Z
I've seen this happen a couple of times and it's confusing me slightly. Is it a bug or am I missing something?
It is correct. This happens because in javascript month start from 0 not 1.
You can read in details here.
does anyone know where I can download this zip file called "businessdays.zip" which was mentioned from this link ... http://www.tek-tips.com/viewthread.cfm?qid=136159 ... I mean is there a better way of calculating business days/holidays than what is previously written here ... http://www.experts-exchange.com/Database/Reporting_/Crystal_Reports/Q_21376129.html ... I've tried this but method from experts-exchange, registered the dll but still not working for me. Can anyone help?
You could create a custom function that returns an array of holidays. See my answer to Crystal Report exclude time entries based on holiday rules.
In this post there is a function that takes a start date, and end date and return the number of working days in between. Also takes holidays into account.