Poll Tag Historian At Midnight For 24 Hour Usage

I have a project in Ignition 8.0 that is currently collecting totalizer data in a tag with history enabled. The end goal is to add a numerical readout on a vision dashboard that shows "Last 24 Hours" and "Current 24 Hours".

"Last 24 hours" would be the difference in the tag values closest to midnight yesterday morning and midnight this morning. "Current 24 Hours" would be the difference in tag values from this morning at midnight to the last recorded tag value today, to show a running total.

I can find the appropriate dateTime data using an expression like:

midnight(addDays(now(),-1))

but I'm having trouble correlating this with the Unix time in the t_stamp data in historian.

Is this the right approach to get what I would think is a simple grab, or is there a more efficient way of doing this?

Thanks for any help you can provide!