You can use the substring function to essentially chop off the time from the field.
We've tried this on one of our Service requests and it did the job for us as we had a similar issue. In our environment we used:
$(SUBSTRING(GetSRPValue(RecId, "Baseline_Date"), 1, 10))
Baseline_Date was our date field
The example given in the Admin help explains the syntax you need:
$(Substring(Symptom, 21, 7))
If the Symptom field in the current business object contains the following:
Printer seems to be working fine for others. His setup for the printer is fine.
It returns the substring starting with the 21st character and continues for 7 characters. The result of this function in this example is working.
3 of 3 people found this helpful
You can also use the FormatDate function.
Using the same example as Ian did in his previous comment where Baseline_Date is the date field:
$(FormatDate(GetSRPValue(RecId, "Baseline_Date"), "dd-MMM-yyyy"))
Returns a date in the format: 04-Feb-2016
have you had any experience using this FormatDate command on a non-mandatory field?
We are experience an issue where when using this command on a non-mandatory field, it still wants to format something so if the user does not select a date it drops in the current date so that it can format something.
2 of 2 people found this helpful
If you put that FormatDate expression in an IF statement, you could tell it to format only if the date is !null. So I think it would look like:
then FormatDate(GetSRPValue(RecId, "Baseline_Date"), "dd-MMM-yyyy")
You might have to play around with the formula above though. Good luck!
this would work if we were not trying to format the date within a notification
1 of 1 people found this helpful
You're welcome. It should still work in an email notification as well - we've successfully formatted email notifications based on IF expressions in our environment. For example, we've formatted task escalation notifications to include Service Request Requestor, Service Request Requested For, or Incident full name. In the example below, I've stacked two separate conditions instead of building them together since the same task will never be for both Incident and Service Request at the same time.
$([Incident#.Rev3]ProfileFullName)$(if Isnull([ServiceReq#.ServiceReqAssocTaskAssignment]CC_RequestedFor) then [ServiceReq#.ServiceReqAssocTaskAssignment]ProfileFullName else [ServiceReq#.ServiceReqAssocTaskAssignment]CC_RequestedFor)