Results 1 to 6 of 6

Thread: Temporal Data Type In SQL

  1. #1
    Join Date
    Jan 2009
    Posts
    74

    Temporal Data Type In SQL

    Hello, I am learning SQL database language. And while learning the Sql data types I am get confused between the Temporal Data Type. I am not getting this data type. If anyone is having simpler explanation about it, then please provide me help regarding it. I will be thankful to you.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Temporal Data Type In SQL

    Details of Temporal Data Type In SQL :
    DATE : Gregorian date
    TIME : Time in 24 hours
    TIMESTAMP : Combined date time
    INTERVAL Intervals in date / time

    The stored values should be based on the Gregorian calendar [2] which is in use since 1582, when he replaced the Julian calendar. In terms of time synchronization is done in relation to UT or Universal Time (UTC: Universal Time Coodinated) formerly GMT (Greenwich Mean Time) all having been introduced at the conference in Washington DC in 1884 to prevent rail routes not collide.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Temporal Data Type In SQL

    You need to take caution while using the Temporal Data Type IN sql.
    CAUTION : The ISO standard adopted for the SQL based on the format YYYY-MM-DD. It is thus valid until the year 9999 ... or YYYY is the 4-digit year, MM the month on two digits, and DD is the day. For now the ISO format is hh: mm: ss.nnn (n being the number of milliseconds)

    Example:

    1999-03-26 22:54:28.123

    is March 26, 1999 at 22h 54m, 28s and 123 milliseconds.

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Temporal Data Type In SQL

    Hello, it is quiet difficult to handle the Temporal data in the Sql server queries, as it provide you support for the subset of the some of the features which are provided by the SQL for supporting the temporal data. And in SQL Server
    2008 only moment in time provided by the temporal data types and INTERVAL data type are not supported. If you want to provide support for such operations then you must need to build your own custom solution.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Temporal Data Type In SQL

    Use of the temporal data type in sql is rare. The INTERVAL is very special. Unfortunately it is rarely present in the RDBMS.
    Its definition is done using the following syntax:
    Code:
    INTERVAL TO precision_min [precision_max]
    precision_min and precision_max which can take values:
    Code:
    (YEAR | MONTH | DAY | HOUR | MINUTE | SECOND)
    with the following additional condition: precision_max can only be a temporary measure finer than precision_min.

    Example:
    Code:
    DAYS INTERVAL DAY
    QUARTER INTERVAL MONTH TO DAY
    TASK INTERVAL HOUR TO SECOND
    DUREE_FILM INTERVAL MINUTE

  6. #6
    Join Date
    May 2008
    Posts
    2,012

    Re: Temporal Data Type In SQL

    Temporal Data Type In SQL provides you the following built in functions:
    • ADD_MONTHS( date, months)
    • CURRENT_DATE
    • CURRENT_TIMESTAMP
    • DBTIMEZONE
    • EXTRACT( ele)

Similar Threads

  1. Data type and expressions
    By cloud101 in forum Software Development
    Replies: 1
    Last Post: 18-01-2012, 11:47 PM
  2. What is the purpose of converting data type?
    By snapper in forum Software Development
    Replies: 1
    Last Post: 16-07-2010, 11:00 AM
  3. Replies: 4
    Last Post: 25-09-2009, 05:09 PM
  4. DWORD data type in c
    By Zoey in forum Software Development
    Replies: 3
    Last Post: 24-08-2009, 06:33 PM
  5. When to create User Defined Data Type in VB.Net
    By Nihar Khan in forum Software Development
    Replies: 3
    Last Post: 27-02-2009, 11:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,437,176.30126 seconds with 16 queries