sql icon indicating copy to clipboard operation
sql copied to clipboard

[FEATURE] Support date and time functions

Open Yury-Fridlyand opened this issue 2 years ago • 0 comments

Copied from https://github.com/opendistro-for-elasticsearch/sql/issues/709.

Implementation should match MySQL standard: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html

  • [x] date
  • [x] time
  • [x] timestamp
  • [x] adddate
  • [x] date_add
  • [x] date_format
  • [x] date_sub
  • [x] dayname
  • [x] dayofweek
  • [x] dayofmonth
  • [x] dayofyear
  • [x] from_days
  • [x] makedate - #755
  • [x] maketime- #755
  • [x] monthname
  • [x] hour
  • [x] minute
  • [x] second
  • [x] microsecond
  • [x] day
  • [x] week
  • [x] month
  • [x] quarter
  • [x] year
  • [x] subdate
  • [x] time_to_sec
  • [x] to_days
  • [ ] addtime
  • [ ] adddate
  • [ ] convert_tz - #848
  • [x] curdate - #754
  • [x] current_date - #754
  • [x] current_time - #754
  • [x] current_timestamp - #754
  • [x] curtime - #754
  • [ ] datediff
  • [ ] datetime - #848
  • [ ] date_add (update)
  • [ ] date_sub (update)
  • [ ] day_of_month
  • [ ] day_of_year
  • [ ] extract
  • [ ] hour_of_day
  • [ ] from_unixtime - #835
  • [ ] get_format
  • [ ] last_day
  • [x] localtime - #754
  • [x] localtimestamp - #754
  • [ ] minute_of_day
  • [ ] minute_of_hour
  • [ ] month_of_year
  • [x] now - #754
  • [ ] period_add - #933
  • [ ] period_diff - #933
  • [ ] sec_to_time
  • [ ] second_of_minute
  • [ ] str_to_date
  • [ ] subtime
  • [x] sysdate - #754
  • [ ] time
  • [ ] timediff/time_diff
  • [ ] timestamp
  • [ ] timestampadd
  • [ ] timestampdiff
  • [ ] time_format
  • [ ] to_seconds
  • [ ] unix_timestamp - #835
  • [ ] utc_date
  • [ ] utc_time
  • [ ] utc_timestamp
  • [ ] weekday
  • [ ] weekofyear/week_of_year
  • [ ] yearweek
  • [ ] >/=/< (comparison operators for datetime types)

Further improvements:

  • [ ] #859
  • [ ] #861
  • [ ] #862
  • [ ] #853
  • [ ] #852
  • [ ] #855

Yury-Fridlyand avatar Aug 03 '22 22:08 Yury-Fridlyand