Does the influxdb have a function of conversion time for me to operate tag

hello, I set date as a tag, and now I want to select my data between two dates that I set as a tag.
Here is my example.

show tag values with key = trading_day
name: min_ochls
key value
trading_day 20170707
trading_day 20170710
trading_day 20170711
trading_day 20170712
trading_day 20170713
trading_day 20170714
trading_day 20170717
trading_day 20170718
trading_day 20170725
trading_day 20170726
trading_day 20170727
trading_day 20170728
trading_day 20170731
trading_day 20170801
trading_day 20170802
trading_day 20170803
trading_day 20170804


I want to select like this:
select first(open) from min_ochls where trading_day > ‘20170705’ and trading_day < ‘20170809’ group by trading_day
Does the influxdb have a function of conversion time for me to operate tag?Can I compare the tag? How can I write the statement?

I don’t see any point in using a as a field or tag under a TimeSeries database. It seems you are having issues working with the timestamps; I would rather suggest you to use a graphical tools like Chronograf or Graphana to view the results which reduces the complexity of working with raw DB timestamps.