mysql - yesterday's date

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
patejl
Forum Newbie
Posts: 3
Joined: Mon Nov 24, 2003 2:35 am
Contact:

mysql - yesterday's date

Post by patejl »

hey all,
just simple question for you :)

how to obtain yesterday's date? i want select all yesterday's operation from table. is it better to prepare it by php or by mysql select statement?

best
patejl
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

select date_format(now()-interval 1 day,'%Y%m%d');
Post Reply