• how to get the date from the first date

    From Niraj Kothari@21:1/5 to All on Thu Jul 29 02:11:57 2021
    what is the sql query to find out the full date where we put the starting date means 09/08/2020 We Only put 09. and how i will get 09/08/2020 This date

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to Niraj Kothari on Thu Jul 29 14:10:31 2021
    On 29/07/2021 11.11, Niraj Kothari wrote:
    what is the sql query to find out the full date where we put the starting date means 09/08/2020 We Only put 09. and how i will get 09/08/2020 This date

    select day_column_name + "/08/2020" from table_name;

    To get a whole date you have to store the whole data, change the column
    type VarChar(2) to one of the following:

    - Date [Format: YYYY-MM-DD, Range: '1000-01-01' to '9999-12-31']

    - DateTime [Format: 'YYYY-MM-DD hh:mm:ss[.fraction]', Range: '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999']

    - TimeStamp [Format: 'YYYY-MM-DD hh:mm:ss[.fraction]', Range:
    '1970-01-01 00:00:01.000000' to '2038-01-19 03:14:07.999999']


    Then you can use DAY(date_column_name) to get the day from the Date/DateTime/TimeStamp and DATE_FORMAT(date_column_name, '%d/%m/%Y') to
    be sure to get it in the odd format you want to get it in.

    --

    //Aho

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)