Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Temporal Data Type In SQL

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-02-2010
Member
 
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.

Reply With Quote
  #2  
Old 02-02-2010
Member
 
Join Date: May 2008
Posts: 2,383
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.
Reply With Quote
  #3  
Old 02-02-2010
Member
 
Join Date: Jan 2008
Posts: 1,515
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.
Reply With Quote
  #4  
Old 02-02-2010
Member
 
Join Date: Feb 2008
Posts: 1,848
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.
Reply With Quote
  #5  
Old 02-02-2010
Member
 
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
Reply With Quote
  #6  
Old 02-02-2010
Member
 
Join Date: May 2008
Posts: 2,008
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)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Temporal Data Type In SQL"
Thread Thread Starter Forum Replies Last Post
Data type and expressions cloud101 Software Development 1 18-01-2012 11:47 PM
What is the purpose of converting data type? snapper Software Development 1 16-07-2010 11:00 AM
How to convert Double data type value into Integer one in Java Rover Software Development 4 25-09-2009 05:09 PM
DWORD data type in c Zoey Software Development 3 24-08-2009 06:33 PM
When to create User Defined Data Type in VB.Net Nihar Khan Software Development 3 27-02-2009 11:29 AM


All times are GMT +5.5. The time now is 10:16 PM.