Quote:
|
midnight timestamp for yesterday
|
I'm not sure wheather it is '2012-01-27 00.00.00' or '2012-01-26 00.00.00', if today is '2012-01-27'.
If assumed the former, try ...
current_timestamp - MIDNIGHT_SECONDS(current_timestamp) SECONDS
or
TIMESTAMP(current_date)
If you want the latter,
minus one day from the expressions.