dimanche 7 février 2021

get the month and year of the given date field

I have the field date_start field which is a date datatype. I want to get the month and year of the field date_start and check the month is in given date month '2021-02-01'.

$meeting_ids=DB::table('meeting_dump')->Where(DB::raw(date('m-y',strtotime('meeting_dump.date_start'))),'=',date("m-y", strtotime($dates_between[0]))) ->pluck('meeting_dump.parent_id')->toArray();

given date is 2021-02-01 and meeting start date is 2021-02-01, 2021-01-05 need to pick the parent_id for 2021-02-01



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire