Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issue in quering with date #2125

Unanswered
Rik0253 asked this question in Q&A
Discussion options

  • Laravel-mongodb Version: 3.7.0
  • PHP Version: 7.4.2
  • Database Driver & Version:1.6.1

Description:

I have added the below code in model
protected $dates = ['sale_start_date',''sale_end_date];

My query are like this

$startDate = Carbon::parse("2020-10-14");
$endDate = Carbon::parse("2020-10-16");
$property->where('sale_start_date','>=',$startDate)->where('sale_end_date','<='$endDate)->get()->toArray();

I have data from 2020年10月14日T00:00:00.000+00:00 to 2020年10月31日T00:00:00.000+00:00
But I am getting empty array but I have data

What I am doing wrong?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #2125 on October 15, 2020 16:24.

AltStyle によって変換されたページ (->オリジナル) /