How to select record from last 6 months in a table using MySQL?

I want to get the last 3-6 months’ records fromĀ  fund_master table. date_payment is the date type column.

1 Answer

  1. You can use DATE_SUB() to get the last 6 months’ records.

    select * from fund_master where date_payment BETWEEN DATE_SUB( CURDATE( ) ,INTERVAL 180 DAY ) AND CURDATE( ) ;

  2. Reply

Leave a Comment

izmir eskort - mersin eskort bayan - adana eskort - antalya eskort - eskort istanbul
Code Compiler Web Tools Contact