Skip to main content
added 24 characters in body; edited tags
Source Link
artwork21
  • 35.2k
  • 8
  • 67
  • 134

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. I am wondering if the "between" operator exists like in SQL? I'm trying the following query but the results are wrong. Or is it the date format which is a problem?

( (("all_ws_d_2" <= '01-09-16') and ("all_ws_d_3" >= '30-09-16')) or (("all_ws_d_2" >= '01-09-16') and ("all_ws_d_3" <= '30-09-16')) or (("all_ws_d_2" <= '01-09-16') and (("all_ws_d_3" => '01-09-16') and ("all_ws_d_3" <= '30-09-16' ))) or (("all_ws_d_2" >= '01-09-16') and (("all_ws_d_2" <= '30-09-16') and ("all_ws_d_3" >= '30-09-16'))) )

(
(("all_ws_d_2"  <= '01-09-16') and  ("all_ws_d_3"   >=   '30-09-16'))
or (("all_ws_d_2"  >=  '01-09-16') and ("all_ws_d_3"  <= '30-09-16'))
or (("all_ws_d_2" <=  '01-09-16') and (("all_ws_d_3"   => '01-09-16') and ("all_ws_d_3"   <=  '30-09-16' )))
or (("all_ws_d_2" >= '01-09-16') and  (("all_ws_d_2"  <=   '30-09-16') and ("all_ws_d_3"  >=  '30-09-16')))
)

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. I am wondering if the "between" operator exists like in SQL? I'm trying the following query but the results are wrong. Or is it the date format which is a problem?

( (("all_ws_d_2" <= '01-09-16') and ("all_ws_d_3" >= '30-09-16')) or (("all_ws_d_2" >= '01-09-16') and ("all_ws_d_3" <= '30-09-16')) or (("all_ws_d_2" <= '01-09-16') and (("all_ws_d_3" => '01-09-16') and ("all_ws_d_3" <= '30-09-16' ))) or (("all_ws_d_2" >= '01-09-16') and (("all_ws_d_2" <= '30-09-16') and ("all_ws_d_3" >= '30-09-16'))) )

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. I am wondering if the "between" operator exists like in SQL? I'm trying the following query but the results are wrong. Or is it the date format which is a problem?

(
(("all_ws_d_2"  <= '01-09-16') and  ("all_ws_d_3"   >=   '30-09-16'))
or (("all_ws_d_2"  >=  '01-09-16') and ("all_ws_d_3"  <= '30-09-16'))
or (("all_ws_d_2" <=  '01-09-16') and (("all_ws_d_3"   => '01-09-16') and ("all_ws_d_3"   <=  '30-09-16' )))
or (("all_ws_d_2" >= '01-09-16') and  (("all_ws_d_2"  <=   '30-09-16') and ("all_ws_d_3"  >=  '30-09-16')))
)

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. i maI am wondering if athe "between" operator exists like in SQL? I'm trying the following query but the results coming out are wrong. Or is it the date format which is a problem?

( (("all_ws_d_2" <= '01-09-16') and ("all_ws_d_3" >= '30-09-16')) or (("all_ws_d_2" >= '01-09-16') and ("all_ws_d_3" <= '30-09-16')) or (("all_ws_d_2" <= '01-09-16') and (("all_ws_d_3" => '01-09-16') and ("all_ws_d_3" <= '30-09-16' ))) or (("all_ws_d_2" >= '01-09-16') and (("all_ws_d_2" <= '30-09-16') and ("all_ws_d_3" >= '30-09-16'))) )

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. i ma wondering if a "between" operator exists like in SQL? I'm trying the following query but the results coming out are wrong. Or is it the date format which is a problem?

( (("all_ws_d_2" <= '01-09-16') and ("all_ws_d_3" >= '30-09-16')) or (("all_ws_d_2" >= '01-09-16') and ("all_ws_d_3" <= '30-09-16')) or (("all_ws_d_2" <= '01-09-16') and (("all_ws_d_3" => '01-09-16') and ("all_ws_d_3" <= '30-09-16' ))) or (("all_ws_d_2" >= '01-09-16') and (("all_ws_d_2" <= '30-09-16') and ("all_ws_d_3" >= '30-09-16'))) )

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. I am wondering if the "between" operator exists like in SQL? I'm trying the following query but the results are wrong. Or is it the date format which is a problem?

( (("all_ws_d_2" <= '01-09-16') and ("all_ws_d_3" >= '30-09-16')) or (("all_ws_d_2" >= '01-09-16') and ("all_ws_d_3" <= '30-09-16')) or (("all_ws_d_2" <= '01-09-16') and (("all_ws_d_3" => '01-09-16') and ("all_ws_d_3" <= '30-09-16' ))) or (("all_ws_d_2" >= '01-09-16') and (("all_ws_d_2" <= '30-09-16') and ("all_ws_d_3" >= '30-09-16'))) )

Source Link
philippe
  • 475
  • 1
  • 4
  • 13

Between operator QGIS

I am using QGIS Essen version (2.14.1). I am trying to filter my data based on dates. i ma wondering if a "between" operator exists like in SQL? I'm trying the following query but the results coming out are wrong. Or is it the date format which is a problem?

( (("all_ws_d_2" <= '01-09-16') and ("all_ws_d_3" >= '30-09-16')) or (("all_ws_d_2" >= '01-09-16') and ("all_ws_d_3" <= '30-09-16')) or (("all_ws_d_2" <= '01-09-16') and (("all_ws_d_3" => '01-09-16') and ("all_ws_d_3" <= '30-09-16' ))) or (("all_ws_d_2" >= '01-09-16') and (("all_ws_d_2" <= '30-09-16') and ("all_ws_d_3" >= '30-09-16'))) )