Tag:week

  • Shell determines the year code according to date, month and week

    Time:2021-4-23

    Three time variables are known time1=”Fri Aug 23 11:35:21″ time2=”Mon Sep 2 16:18:09″ time3=”Tue Sep 3 16:06:33″Given that these three times can be determined to occur in 2011-2013, how to quickly determine which year? Desired output: time1=”2013/8/23 11:35:21″ time2=”2013/9/2 16:18:09″ time3=”2013/9/3 16:06:33″ #!/bin/bash time1=”Fri Aug 23 11:35:21″ time2=”Mon Sep 2 16:18:09″ time3=”Tue Sep 3 16:06:33″ […]

  • Oracle’s query sorting method by day, week, month, quarter and year

    Time:2019-12-8

    Oracle queries by day, week, month, quarter and year Day — to_char (t.start_time, ‘yyyy-mm-dd’) Week — to char (t.start time, ‘yyyy’), to char (t.start time, ‘IW’) Monthly -‘to’char (t.start’time, ‘yyyy-mm’) Quarter — to char (t.start’time, ‘yyyy’), to char (t.start’time, ‘Q’) Year -‘to’char (t.start’time, ‘yyyy’) Query by day select to_char(t.start_time,’YYYY-MM-DD’) day ,count(*) from test t Where […]