Forum Discussion

Sandip11850's avatar
Sandip11850
Copper Contributor
Feb 15, 2023

Check date format in SQL

How do i check format of date in SQL meaning either it is MM/DD/YYYY of DD/MM/YYYY,

    • Sandip11850's avatar
      Sandip11850
      Copper Contributor

      Thanks for reply olafhelper .

      But then how SQL differentiates between such dates Either it is 4 May 2023 or 5 April 2023.

      or if date format is chosen for Field while creating data table in the SQL.

      So How do we get that, in which format date is stored.

       

      • olafhelper's avatar
        olafhelper
        Bronze Contributor

        Sandip11850 if you have a table column of type date/datetime, then SQL Server stores the value as some binary/numeric without any format information.

        It's always the frontend that formats the value and a good app should consider here the localize settings of the user.

Resources