I have written some useful query. When you need some customization in date format and find some prior date using SQL then below query might be useful for you.

Find prior/future date from the current/given date:

SELECT now()::date + 2 AS date1, current_date -1 AS date2

You can also fetch past and future date with the above query:

We can get dates as per our requirement like

	 select to_char(current_date   , 'MM/DD/YY'); 
	 select to_char(current_date   , 'MM/DD/YYYY'); 
	 select to_char(current_date   , 'MM-DD-YY'); 
	 select to_char(current_date   , 'MM DD YYYY'); 
	 select to_char(current_date   , 'Month,DD,YYYY'); 
	 select to_char(current_timestamp, 'Day, DD  HH12:MI:SS') 	 
	 select to_char(current_timestamp, 'FMDay, FMDD  HH12:MI:SS')

…. so on

In above query there is limitation like to_char support only in Postgresql and return as a string not in date* format .

In above query you can get prior/future date also.

	 select to_char(current_date -1  , 'MM/DD/YY'); 
	 select to_char(current_date +1  , 'Month,DD,YYYY'); 

If you are looking for date formats. You can use the below query as per your needs.

 SELECT EXTRACT(YEAR FROM CURDATE()) AS OrderYear, 
	EXTRACT(MONTH FROM CURDATE()) AS OrderMonth, 
	EXTRACT(DAY FROM CURDATE()) AS OrderDay,
	EXTRACT(YEAR_MONTH FROM CURDATE()) AS OrderDay, 
	EXTRACT(YEAR_MONTH FROM CURDATE()) AS OrderDay, 
	DATE_FORMAT(NOW(),'%b %d %Y %h:%i %p') , 
	DATE_FORMAT(NOW(),'%m-%d-%Y') , 
	DATE_FORMAT(NOW(),'%d %b %y') , 
	DATE_FORMAT(NOW(),'%d %b %Y %T:%f')  ;