@Sree Venkata
You can do this using a combination of NiFi Expression Language (EL) functions:
${now()
:minus(${now():mod(86400000)})
:minus(43260000) :format('MM-dd-yyyy hh:mm:ss')
}
This EL statement takes now subtracts the remainder resulting from dividing now by 86400000 (number of milliseconds in 24 hours) and then subtracts an additional 43260000 (12 hours and 1 minute) from that result and finally formatting the output in the date format you are looking for.
I confirmed this EL statement by using it in an UpdateAttribute processor:
and if I look at the attributes on a FlowFile that was processed by the above, I see:
You can see that the attribute "yesterday" is set to exactly one day earlier from "current time" and 11:59:00.
Thanks,
Matt