0

I have a column that returns dates in this form:

"2016-06-01 23:29:34.283"

I am wondering how I can fill the cell background green if the day matches today, and red if its not today (hour and minute doesn't matter).

I tried this but no luck:

=Switch(Fields!Last_Upload.value = Today(), "Green", Fields!Last_Upload.value != Today(), "Red").

Edit: This is using VS Data Tools

choloboy
  • 35
  • 1
  • 7

1 Answers1

2

Of course the problem is comparing the date without the timestamp. You can use the DateValue function for this like so:

=IIf(DateValue(Fields!Last_Upload.value) = Today, "Green", "Red")
StevenWhite
  • 5,907
  • 3
  • 21
  • 46