Said Salomon Unitrin Direct Insurance T-SQL Date and Time Functions Said Salomon.

Slides:



Advertisements
Similar presentations
Said Salomon Unitrin Direct Insurance T-SQL Aggregate Functions Said Salomon.
Advertisements

Representing Data Elements Gayatri Gopalakrishnan.
CS240A: Databases and Knowledge Bases Time Ontology and Representations Carlo Zaniolo Department of Computer Science University of California, Los Angeles.
Fall 2001Arthur Keller – CS 1808–1 Schedule Today Oct. 18 (TH) Schemas, Views. u Read Sections u Project Part 3 extended to Oct. 23 (T). Oct.
Winter 2002Arthur Keller – CS 1808–1 Schedule Today: Jan. 29 (T) u Modifications, Schemas, Views. u Read Sections Assignment 3 due. Jan. 31 (TH)
Databases Lab 5 Further Select Statements. Functions in SQL There are many types of functions provided. The ones that are used most are: –Date and Time.
Best People. Best Technology. SQL Server 2008 What’s New for Developers June 15 1 Speaker: Aviel Iluz | Database Consultant Contact:
CS240A: Databases and Knowledge Bases Time Ontology and Representations Carlo Zaniolo Department of Computer Science University of California, Los Angeles.
Copyright ©2014 Pearson Education, Inc. Chapter 6 Physical Design Chapter6.1.
Oracle9 i Datetime Functions Fresher Learning Program January, 2012.
Working with Data Types February 7, 2015 John Deardurff Website:
Module 2 Working with Data Types. Module Overview Using Data Types Working with Character Data Converting Data Types Working with Specialized Data Types.
Overview of SQL Server Alka Arora.
Said Salomon  I has over 25 year experience as an Information Technology Professional. He has a vast array of abilities.
Basis Data Terapan Yoannita. SQL Server Data Types Character strings: Data typeDescriptionStorage char(n)Fixed-length character string. Maximum 8,000.
SQL Server 2008 for Developers John
HAP 709 – Healthcare Databases SQL Data Manipulation Language (DML) Updated Fall, 2009.
TSQL Improvements & Data Types SQL Server 2008 TSQL Improvements & Data Types Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP,
WHAT’S NEW IN SQL SERVER 2008: T-SQL Martin Bell SQL Server MVP.
Sizing Basics  Why Size?  When to size  Sizing issues:  Bits and Bytes  Blocks (aka pages) of Data  Different Data types  Row Size  Table Sizing.
April 10, Platinum and Gold Partners Data Encryption and Key Management in SQL Said Salomon Database Administrator Unitrin Direct Insurance.
Said Salomon Unitrin Direct Insurance T-SQL for Beginners Said Salomon CODE CAMP
Date Variables Visual Basic for Applications 5. Objectives n In this tutorial, you will learn how to: n Reserve a Date variable n Use an assignment statement.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
SCUHolliday - coen 1788–1 Schedule Today u Modifications, Schemas, Views. u Read Sections (except and 6.6.6) Next u Constraints. u Read.
Dates and Times. Slide 2 Introduction to Dates and Times (1) The DateTime data type is used to store dates and times There is a date part There is a time.
SQL ORACLE 1. Data Type 2 3 VARCHAR2(size [BYTE | CHAR]) Variable-length character string having maximum length size bytes or characters. Maximum size.
03 | SQL Server Data Types Brian Alderman | MCT, CEO / Founder of MicroTechPoint Tobias Ternstrom | Microsoft SQL Server Program Manager.
Data types  CHAR (size): This data type is used to store character strings values of fixed length. The size in brackets determines the number of characters.
CIS300 Test 3 Review Reinhardt. © 2009 Dale McIntosh. All Rights Reserved. This Review Will Cover Brief overview of EXCEL functions, followed by EXCEL.
5 Copyright © 2004, Oracle. All rights reserved. Managing Data in Different Time Zones.
Academic Year 2015 Autumn. MODULE CC2006NI: Data Modelling and Database Systems Academic Year 2015 Autumn.
Lab 3: Single-row Functions College of Information Technology, Universiti Tenaga Nasional 1 CISB224 02A, 02B Semester I, 2009/2010.
Working with Date and Time ISYS 475. How PHP processes date and time? Traditional way: – Timestamp Newer and object oriented way: – DateTime class.
Microsoft Confidential Jon Jahren Produktsjef Applikasjonsplattform Microsoft.
College of Information Technology, Universiti Tenaga Nasional1 Lab 2: Single-row Functions CISB224 01A CCSB244 01A Semester I, 2008/2009.
Said Salomon Unitrin Direct Insurance T-SQL Avoiding cursors Said Salomon.
5 Copyright © 2009, Oracle. All rights reserved. Managing Data in Different Time Zones.
14 New T-SQL Functions By Sam Nasr, MCAD, MCT, MCTS NIS August 18, 2012.
14 New T-SQL Functions By Sam Nasr, MCAD, MCTS. MVP Nasr Information Systems February 8, 2014.
What is your Character Data Type? March 5, 2016 John Deardurff Website:
Creating Database Objects
Meeting Date: August 23, 2007 Topic: New Features of Katmai by Aaron Bertrand.
Exam : Querying Microsoft SQL Server 2012/2014
Do-more Technical Training
Data Definition and Data Types
Attributes and Domains
Ouch! Our Data Type Choices Did THAT?
Dumps4download Exam Dumps With PDF Study Material
Working with SQL Server 2016 Data Types
14 T-SQL Functions You May Not Know
Proper DataType Usage = Guaranteed Better Performance and Accuracy
What is your Character Data Type?
Working with Data Types
What Time Is It? Martin Phillips Ladybridge Systems.
Date Functions Farrokh Alemi, Ph.D.
Defining a Database Schema
PT2520 Unit 5: Physical Design
Data Types Do Matter Start local instance of SQL Start ZoomIt
VBScript Session 10.
14 T-SQL Functions You May Not Know
Chapter 2: Creating And Modifying Database Tables
Kirkwood Center for Continuing Education
Lab 3: Single-row Functions
Trainer: Bach Ngoc Toan– TEDU Website:
Creating Database Objects
Introduction to Oracle
Working with SQL Server 2016 Data Types
Presentation transcript:

Said Salomon Unitrin Direct Insurance T-SQL Date and Time Functions Said Salomon

 I have over 25 year experience IT. I have a vast array of abilities in the field in the areas of Network, Desktop Support, DBA, Staff Project Management, Application Software Development, Business Analysis and Quality Assurance. I have Microsoft certifications as MCTS, MCPS, and MCNPS, and multiple certifications from the Insurance Institute of America. Currently I am a DBA at Unitrin Direct Insurance.

 DateTime  datetime  January 1, 1753, through December 31, 9999  00:00:00 through 23:59:  Accuracy Rounded to increments of.000,.003, or.007 seconds  Storage size 8 bytes

 smalldatetime  January 1, 1900, through June 6, 2079  00:00:00 through 23:59:59  Accuracy One minute  Size 4 bytes, fixed.

 datetime2(7)  January 1,1 AD through December 31, 9999 AD  00:00:00 through 23:59:  Accuracy 100 nanoseconds  Storage size 6 bytes for precisions less than 3; 7 bytes for precisions 4 and 5. All other precisions require 8 bytes.

 datetimeoffset(7)  January 1,1 AD through December 31, 9999 AD  00:00:00 through 23:59:  Time zone offset range -14:00 through +14:00  Accuracy 100 nanoseconds  Storage size 10 bytes, fixed is the default with the default of 100ns fractional second precision.

 date  January 1, 1 A.D. through December 31, 9999 A.D.  No time part  Accuracy One day  Storage size 3 bytes, fixed

 time(7)  No Date part  00:00:00 through 23:59:  Accuracy 100 nanoseconds  Storage size 5 bytes, fixed, is the default with the default of 100ns fractional second precision.

 GetDate()  Returns the current database system timestamp as a datetime value without the database time zone offset. This value is derived from the operating system of the computer on which the instance of SQL Server is running.

 DATEADD (datepart, number, date )  Returns a specified date with the specified number interval (signed integer) added to a specified datepart of that date.

 DATEDIFF ( datepart, startdate, enddate )  Returns the number of date and time boundaries crossed between two specified dates.

 DATENAME ( datepart,date )  Returns a character string that represents the specified datepart of the specified date

 DATEPART ( datepart, date )  Returns an integer that represents the specified datepart of the specified date.

 Returns an integer representing the day datepart of the specified date.

 GETUTCDATE()  Returns the datetime value that represents the current UTC time (Coordinated Universal Time or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which the instance of Microsoft SQL Server is running.

 MONTH ( date )  Returns an integer that represents the month part of a specified date.

 YEAR ( date )  Returns an integer that represents the year part of a specified date.

 SYSDATETIME ()  Returns a datetime2(7) value that contains the date and time of the computer on which the instance of SQL Server is running.

 SYSDATETIMEOFFSET ()  Returns a datetimeoffset(7) value that contains the date and time of the computer on which the instance of SQL Server is running. The time zone offset is included.

 SYSUTCDATETIME ( )  Returns a datetime2 value that contains the date and time of the computer on which the instance of SQL Server is running. The date and time is returned as UTC time (Coordinated Universal Time). The fractional second precision specification has a range from 1 to 7 digits. The default precision is 7 digits.

 CURRENT_TIMESTAMP  Returns the current database system timestamp as a datetime value without the database time zone offset. This value is derived from the operating system of the computer on which the instance of SQL Server is running.  This function is the ANSI SQL equivalent to GETDATE.GETDATE

 SWITCHOFFSET (DATETIMEOFFSET,time_zone)  Returns a datetimeoffset value that is changed from the stored time zone offset to a specified new time zone offset.

 TODATETIMEOFFSET (expression,time_zone)  Returns a datetimeoffset value that is translated from a datetime2 expression.

 ISDATE (expression )  Returns 1 if the expression is a valid date, time, or datetime value; otherwise, 0.

 Not really date time functions but they can be useful to format or change date and times

 Date Time Functions Functions (books Online)  SQL Server 2008, Dev Edition  My Twitter SaidSalomon