title
DateTime functions in SQL Server Part 25

description
In this video we will learn about different DateTime data types, and different date time functions in sql server. We will also understand the difference between terms UTC (Coordinated Universal Time) and Time Zone offset. Text version of the video http://csharp-video-tutorials.blogspot.co.uk/2012/09/datetime-functions-in-sql-server-part-25.html Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help. https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1 Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-25-datetime-functions-in-sql-server.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists

detail
{'title': 'DateTime functions in SQL Server Part 25', 'heatmap': [{'end': 434.732, 'start': 416.629, 'weight': 0.884}, {'end': 555.864, 'start': 525.951, 'weight': 1}, {'end': 658.933, 'start': 626.451, 'weight': 0.713}, {'end': 861.467, 'start': 842.469, 'weight': 0.955}], 'summary': 'Tutorial series on sql server datetime functions covers topics such as datetime data types, storing time with varying precision, utc time, time zone offset, coordinated universal time (utc) role in calculating times in different time zones, and practical usage of getdate function in sql server for inserting current system date and time.', 'chapters': [{'end': 262.519, 'segs': [{'end': 76.985, 'src': 'embed', 'start': 24.511, 'weight': 0, 'content': [{'end': 30.057, 'text': 'Now, depending on the requirement of the application, we choose the appropriate date time data type.', 'start': 24.511, 'duration': 5.546}, {'end': 39.146, 'text': "For example, if I want to store only the date of birth of a person, then it's enough if I choose the date data type.", 'start': 30.437, 'duration': 8.709}, {'end': 48.387, 'text': "On the other hand, instead of choosing date data type, if you choose date time, let's say I want to store only the date of birth.", 'start': 39.707, 'duration': 8.68}, {'end': 50.148, 'text': "I don't want to capture the time.", 'start': 48.387, 'duration': 1.761}, {'end': 55.952, 'text': "But instead of choosing date data type, I've chosen datatype, datetime datatype.", 'start': 50.449, 'duration': 5.503}, {'end': 62.536, 'text': 'What is the disadvantage of doing? So if you look at datetime datatype, it has got eight bytes, the size.', 'start': 56.232, 'duration': 6.304}, {'end': 65.958, 'text': 'But whereas datatype is only three bytes.', 'start': 63.436, 'duration': 2.522}, {'end': 76.985, 'text': "So when it's not required to capture the time, then probably it makes sense to choose the datatype alone, rather than choosing datetime datatype.", 'start': 66.418, 'duration': 10.567}], 'summary': 'Choose appropriate data type based on need. for date of birth, prefer date over datetime to save storage space.', 'duration': 52.474, 'max_score': 24.511, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI24511.jpg'}, {'end': 161.155, 'src': 'embed', 'start': 106.313, 'weight': 2, 'content': [{'end': 112.996, 'text': 'So there is more precision for nanoseconds here in date time too when we compare that with date time.', 'start': 106.313, 'duration': 6.683}, {'end': 116.278, 'text': 'Now we have this date time offset.', 'start': 114.417, 'duration': 1.861}, {'end': 119.599, 'text': 'Let us understand what we mean by date time offset.', 'start': 116.638, 'duration': 2.961}, {'end': 124.141, 'text': "Now if you look at the date time offset, it's pretty much similar to date time too.", 'start': 119.659, 'duration': 4.482}, {'end': 131.837, 'text': 'We have years, month, days, and then hours, minutes, seconds, nanoseconds.', 'start': 125.475, 'duration': 6.362}, {'end': 136.018, 'text': 'And then you have got some plus, optionally, plus or minus symbol.', 'start': 132.257, 'duration': 3.761}, {'end': 138.399, 'text': "And then you've got hours and minutes.", 'start': 136.458, 'duration': 1.941}, {'end': 147.041, 'text': 'So this piece here, the plus or minus hours and minutes, this is called the time zone offset.', 'start': 139.339, 'duration': 7.702}, {'end': 158.053, 'text': 'And this time, when you use daytime offset data type, this time is usually you know, in UTC time.', 'start': 148.161, 'duration': 9.892}, {'end': 161.155, 'text': 'Okay, this falls in UTC time zone.', 'start': 159.014, 'duration': 2.141}], 'summary': 'Datetimeoffset provides precision to nanoseconds and includes time zone offset in utc time.', 'duration': 54.842, 'max_score': 106.313, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI106313.jpg'}, {'end': 262.519, 'src': 'embed', 'start': 203.176, 'weight': 3, 'content': [{'end': 207.677, 'text': 'rather than worrying about the political reasons behind abbreviating it like that.', 'start': 203.176, 'duration': 4.501}, {'end': 211.079, 'text': 'So UTC stands for Coordinated Universal Time.', 'start': 208.117, 'duration': 2.962}, {'end': 223.189, 'text': 'Basically, this UTC is the central time based on which the world regulates clocks and time.', 'start': 212.822, 'duration': 10.367}, {'end': 235.438, 'text': 'Now, UTC and there is another time zone called GMT, Greenwich Mean Time, they are actually synonymous with each other for all common purposes.', 'start': 224.45, 'duration': 10.988}, {'end': 238.288, 'text': 'But however, there are very slight differences.', 'start': 235.865, 'duration': 2.423}, {'end': 246.318, 'text': 'But most of the time, GMT and UTC are synonymous for all common purposes.', 'start': 239.97, 'duration': 6.348}, {'end': 250.091, 'text': 'Okay, so what do we mean by this UTC?', 'start': 247.549, 'duration': 2.542}, {'end': 255.834, 'text': 'Okay, to understand this practically, you know, all of us have worked with the clock in Windows operating system.', 'start': 250.471, 'duration': 5.363}, {'end': 262.519, 'text': "So if I open the clock in Windows operating system, let's say I want to change the date and time settings,", 'start': 256.235, 'duration': 6.284}], 'summary': 'Utc is the central time regulating world clocks and time, synonymous with gmt for common purposes.', 'duration': 59.343, 'max_score': 203.176, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI203176.jpg'}], 'start': 0.009, 'title': 'Sql server datetime data types, storing time, utc time, and time zone offset', 'summary': 'Covers datetime data types in sql server, with datetime datatype occupying eight bytes and date datatype only three bytes. it also discusses different data types for storing time with varying levels of precision for nanoseconds and explains the concept of utc time, time zone offset, and their synonymous nature for all common purposes.', 'chapters': [{'end': 76.985, 'start': 0.009, 'title': 'Sql server datetime data types', 'summary': 'Covers datetime data types in sql server, including date, time, and small datetime, and discusses the implications of choosing datetime data type over date data type, with datetime datatype occupying eight bytes and date datatype only three bytes.', 'duration': 76.976, 'highlights': ['In SQL Server, various datetime data types are available, such as time, date, and small datetime, which should be chosen based on the specific application requirements.', 'Choosing the appropriate datetime data type is essential to optimize storage, for instance, selecting date data type over datetime datatype when only the date needs to be stored, as date datatype occupies three bytes compared to eight bytes for datetime datatype.']}, {'end': 131.837, 'start': 77.97, 'title': 'Data types for storing time', 'summary': 'Discusses different data types for storing time, including time, date time, and date time offset, with varying levels of precision for nanoseconds.', 'duration': 53.867, 'highlights': ['Date time offset provides more precision for nanoseconds compared to date time.', 'Different data types for storing time include time, date time, and date time offset.']}, {'end': 262.519, 'start': 132.257, 'title': 'Understanding utc time and time zone offset', 'summary': 'Explains the concept of utc time, time zone offset, and their significance in regulating clocks and time, highlighting the synonymous nature of utc and gmt for all common purposes.', 'duration': 130.262, 'highlights': ['UTC, Coordinated Universal Time, is the central time based on which the world regulates clocks and time.', 'GMT and UTC are synonymous with slight differences for all common purposes.', 'The time zone offset, usually in UTC time, is represented by plus or minus hours and minutes.']}], 'duration': 262.51, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI9.jpg', 'highlights': ['Choosing the appropriate datetime data type is essential to optimize storage.', 'Date datatype occupies three bytes compared to eight bytes for datetime datatype.', 'Date time offset provides more precision for nanoseconds compared to date time.', 'UTC is the central time based on which the world regulates clocks and time.', 'GMT and UTC are synonymous with slight differences for all common purposes.', 'The time zone offset, usually in UTC time, is represented by plus or minus hours and minutes.']}, {'end': 510.141, 'segs': [{'end': 382.038, 'src': 'embed', 'start': 287.46, 'weight': 0, 'content': [{'end': 300.885, 'text': 'okay, and then if you look some of these here, so UTC plus two hours, UTC plus three hours, okay, so This UTC is the Coordinated Universal Time,', 'start': 287.46, 'duration': 13.425}, {'end': 310.11, 'text': 'the central, I can say, the world standard time, based on which other clocks and times in different time zones are calculated.', 'start': 300.885, 'duration': 9.225}, {'end': 322.412, 'text': "If in UTC the time is 12 o'clock at the minute, then if we want to calculate what is the time in Germany, which is Berlin.", 'start': 312.464, 'duration': 9.948}, {'end': 333.181, 'text': "so if it is 12 o'clock in UTC Coordinated Universal Time in Germany, it's 12 in the noon plus 1, which means 13 hours,", 'start': 322.412, 'duration': 10.769}, {'end': 335.483, 'text': "1 o'clock in the afternoon in Germany.", 'start': 333.181, 'duration': 2.302}, {'end': 346.39, 'text': "okay. on the other hand, if we want to find out what's the time in New Delhi, so New Delhi is around five and a half hours from UTC, which is India.", 'start': 336.007, 'duration': 10.383}, {'end': 356.693, 'text': "so the time in I mean in UTC time zone, if it's 12 o'clock, then it's 530 in the evening in India.", 'start': 346.39, 'duration': 10.303}, {'end': 367.129, 'text': 'okay, so all the other time zones are based on UTC, so So that plus or minus hours.', 'start': 356.693, 'duration': 10.436}, {'end': 374.533, 'text': 'so if you have to look at the countries on the negative side, I mean on the minus side, UTC minus something.', 'start': 367.129, 'duration': 7.404}, {'end': 377.575, 'text': 'look at this.', 'start': 374.533, 'duration': 3.042}, {'end': 382.038, 'text': 'Central America is UTC minus 6 hours.', 'start': 377.575, 'duration': 4.463}], 'summary': 'Utc is the world standard time, with germany 1 hour ahead and india 5.5 hours ahead.', 'duration': 94.578, 'max_score': 287.46, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI287460.jpg'}, {'end': 447.162, 'src': 'heatmap', 'start': 416.629, 'weight': 2, 'content': [{'end': 427.126, 'text': "okay, but UTC time is 21 19, which means London's time is actually one hour ahead of the UTC time.", 'start': 416.629, 'duration': 10.497}, {'end': 434.732, 'text': "But if you look at the London time zone here, we don't have that plus one hour extra here.", 'start': 428.167, 'duration': 6.565}, {'end': 442.218, 'text': 'It just says UTC, Coordinated Universal Time, and then UTC, Dublin, Edinburgh, Lisbon, London.', 'start': 434.752, 'duration': 7.466}, {'end': 447.162, 'text': 'But then, if you look at the time that I have selected, there is one hour difference.', 'start': 443.399, 'duration': 3.763}], 'summary': 'London time is one hour ahead of utc time.', 'duration': 30.533, 'max_score': 416.629, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI416629.jpg'}], 'start': 262.519, 'title': 'Time zones and coordinated universal time', 'summary': "Explains coordinated universal time (utc) and its role in calculating times in different time zones, such as germany and india, based on utc, with examples of utc plus and minus hours. it also highlights the one-hour difference between london's time and utc due to daylight savings, demonstrated through a practical example.", 'chapters': [{'end': 382.038, 'start': 262.519, 'title': 'Understanding time zones and coordinated universal time', 'summary': 'Explains the concept of coordinated universal time (utc) and its role in calculating times in different time zones, such as germany and india, based on utc, with examples of utc plus and minus hours.', 'duration': 119.519, 'highlights': ['The UTC is the Coordinated Universal Time, which serves as the world standard time, from which other clocks and times in different time zones are calculated, such as Germany and India.', "Examples of time calculations based on UTC are given, such as 12 o'clock in UTC being 13:00 in Germany, and 12 o'clock in UTC being 17:30 in India.", 'Explanation of time zones as UTC plus or minus hours, with an example of Central America being UTC minus 6 hours.']}, {'end': 510.141, 'start': 382.418, 'title': 'Understanding time zones and daylight savings', 'summary': "Explains the concept of time zones and daylight savings, highlighting the one-hour difference between london's time and utc due to daylight savings, demonstrated through a practical example.", 'duration': 127.723, 'highlights': ['London time is currently one hour ahead of UTC time due to daylight savings, resulting in a time difference of 21:19 UTC and 22:18 London time.', 'The concept of daylight savings is demonstrated through the practical example of clocks being moved one hour forward during summer, causing the time difference.', 'The offset from the UTC time zone is explained as the plus or minus difference, with the practical example showing the 1-hour offset between London and UTC time.', 'The practical demonstration of selecting different time zones and observing the time differences provides a clear understanding of the concept.']}], 'duration': 247.622, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI262519.jpg', 'highlights': ['The UTC is the Coordinated Universal Time, serving as the world standard time for calculating times in different time zones.', "Examples of time calculations based on UTC are given, such as 12 o'clock in UTC being 13:00 in Germany and 17:30 in India.", 'London time is currently one hour ahead of UTC time due to daylight savings, resulting in a time difference of 21:19 UTC and 22:18 London time.', 'Explanation of time zones as UTC plus or minus hours, with an example of Central America being UTC minus 6 hours.']}, {'end': 924.564, 'segs': [{'end': 567.089, 'src': 'heatmap', 'start': 525.951, 'weight': 0, 'content': [{'end': 534.176, 'text': "So in order to understand these different data types, I've created a very simple table here called tblDatetime.", 'start': 525.951, 'duration': 8.225}, {'end': 537.899, 'text': 'And I have used all the datetime data types that are available.', 'start': 534.657, 'duration': 3.242}, {'end': 545.824, 'text': 'you know time, date, small datetime, datetime et cetera in this table just to show you practically how the data gets stored in the table.', 'start': 537.899, 'duration': 7.925}, {'end': 553.228, 'text': 'So if you look at this, we have this column ctime, which is time data type.', 'start': 546.264, 'duration': 6.964}, {'end': 555.864, 'text': 'C date is just date data type.', 'start': 553.723, 'duration': 2.141}, {'end': 558.125, 'text': 'Small date time is small date time.', 'start': 556.404, 'duration': 1.721}, {'end': 566.129, 'text': 'I have included C underscore just to give it a C underscore indicates column in that table.', 'start': 558.225, 'duration': 7.904}, {'end': 567.089, 'text': "It's about that.", 'start': 566.469, 'duration': 0.62}], 'summary': 'Demonstrates storage of different datetime data types in table.', 'duration': 56.588, 'max_score': 525.951, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI525951.jpg'}, {'end': 618.007, 'src': 'embed', 'start': 591.827, 'weight': 4, 'content': [{'end': 597.328, 'text': 'Just like all these functions, to work with datetime data types, we have datetime functions.', 'start': 591.827, 'duration': 5.501}, {'end': 600.529, 'text': 'And one of the very common functions that we use is getDate.', 'start': 597.688, 'duration': 2.841}, {'end': 603.66, 'text': 'which will basically give us the current system date and time.', 'start': 600.919, 'duration': 2.741}, {'end': 606.702, 'text': 'So, when I execute that, I get the current system date and time.', 'start': 603.98, 'duration': 2.722}, {'end': 608.723, 'text': "Now, I'm using this function.", 'start': 607.262, 'duration': 1.461}, {'end': 618.007, 'text': 'Instead of typing in the values for time, date, small date, time, you know, for all these columns, I am actually using this method.', 'start': 608.763, 'duration': 9.244}], 'summary': 'Datetime functions like getdate provide current system date and time, simplifying data input.', 'duration': 26.18, 'max_score': 591.827, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI591827.jpg'}, {'end': 658.933, 'src': 'heatmap', 'start': 626.451, 'weight': 0.713, 'content': [{'end': 631.916, 'text': 'Okay, Year, month, days, hour, minutes, seconds and milliseconds.', 'start': 626.451, 'duration': 5.465}, {'end': 634.198, 'text': 'I mean nanoseconds, rather okay.', 'start': 631.916, 'duration': 2.282}, {'end': 645.483, 'text': 'so now, when I try to execute this query, so one row affected, which means one row got inserted into this table called tblDateTime.', 'start': 634.198, 'duration': 11.285}, {'end': 654.591, 'text': 'so if I select this, look at this time is only storing the time, hours, minutes, seconds and the nanoseconds.', 'start': 645.483, 'duration': 9.108}, {'end': 658.933, 'text': 'so which is nothing but our time data, type hours, minutes, seconds and nanoseconds.', 'start': 654.591, 'duration': 4.342}], 'summary': 'One row with time data including hours, minutes, seconds, and nanoseconds was inserted into tbldatetime.', 'duration': 32.482, 'max_score': 626.451, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI626451.jpg'}, {'end': 715.862, 'src': 'embed', 'start': 689.23, 'weight': 2, 'content': [{'end': 693.733, 'text': 'On the other hand, if you want to update that, you can update with any time zone offset.', 'start': 689.23, 'duration': 4.503}, {'end': 701.138, 'text': "But if you want to store the time zone offset in date time 2 data type or date time data type, it's not practically possible.", 'start': 693.833, 'duration': 7.305}, {'end': 702.66, 'text': "It doesn't allow you to do that.", 'start': 701.179, 'duration': 1.481}, {'end': 708.196, 'text': "OK? So let's quickly update it with some offset.", 'start': 704.261, 'duration': 3.935}, {'end': 715.862, 'text': 'So I want to say the offset is maybe plus 1 hour for this time.', 'start': 709.977, 'duration': 5.885}], 'summary': "It's not practically possible to store time zone offset in date time data type.", 'duration': 26.632, 'max_score': 689.23, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI689230.jpg'}, {'end': 812.346, 'src': 'embed', 'start': 787.29, 'weight': 3, 'content': [{'end': 795.795, 'text': 'OK. so apart from getDate, you can also use various other functions like currentTimeStamp, systemDateTime, systemDateTimeOffset,', 'start': 787.29, 'duration': 8.505}, {'end': 798.937, 'text': 'getUtcDate and systemUtcDateTime.', 'start': 795.795, 'duration': 3.142}, {'end': 804.601, 'text': 'So if you look at these functions, they return the current date and time in different formats.', 'start': 799.338, 'duration': 5.263}, {'end': 812.346, 'text': 'OK, so for example, we have just spoken about what is UTC time and the time zone offset.', 'start': 805.141, 'duration': 7.205}], 'summary': 'Functions like getdate, currenttimestamp, systemdatetime, etc. return current date and time in different formats.', 'duration': 25.056, 'max_score': 787.29, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI787290.jpg'}, {'end': 861.467, 'src': 'heatmap', 'start': 842.469, 'weight': 0.955, 'content': [{'end': 853.786, 'text': 'right now, in London, the time is 20 to 26,, which is one hour ahead of the UTC time.', 'start': 842.469, 'duration': 11.317}, {'end': 861.467, 'text': 'So along the same lines, you have these other functions.', 'start': 859.007, 'duration': 2.46}], 'summary': 'London time is 20:26, one hour ahead of utc.', 'duration': 18.998, 'max_score': 842.469, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI842469.jpg'}], 'start': 510.501, 'title': 'Utc time, time zones, and getdate function in sql server', 'summary': 'Explains the concept of utc time and time zones, demonstrating practical storage of datetime data types, and discusses the usage of getdate function in sql server for inserting current system date and time, updating time zone offset, and utilizing other datetime functions including currenttimestamp, systemdatetimeoffset, getutcdate, and sysutcdatetime.', 'chapters': [{'end': 567.089, 'start': 510.501, 'title': 'Understanding utc time and time zones', 'summary': 'Explains the concept of utc time and time zones, and demonstrates the practical storage of different datetime data types in a table, showcasing how the data gets stored.', 'duration': 56.588, 'highlights': ['The chapter provides a clear explanation of UTC time and time zones, clarifying the difference and practical implications when changing dates.', 'A table called tblDatetime is created to demonstrate the practical storage of different datetime data types, including time, date, small datetime, and datetime, to showcase how the data gets stored.']}, {'end': 924.564, 'start': 567.43, 'title': 'Using getdate function in sql server', 'summary': 'Discusses the usage of the getdate function in sql server, demonstrating how to insert current system date and time, update time zone offset, and use other datetime functions, including examples of various functions like currenttimestamp, systemdatetimeoffset, getutcdate, and sysutcdatetime.', 'duration': 357.134, 'highlights': ['The getDate function is used to return the current system date and time in SQL Server, which can be inserted into a table, and when executed, it returns the current system date and time. The getDate function is used to obtain the current system date and time, allowing insertion into a table and returning the current system date and time when executed.', 'Demonstrates updating the time zone offset in the datetime data type using an example of setting a time zone offset of plus 1 hour, showing the practical usage of updating the time zone offset. An example illustrates updating the time zone offset in the datetime data type by setting a time zone offset of plus 1 hour, showcasing the practical usage of updating the time zone offset.', 'Explanation of various datetime functions like currentTimeStamp, systemDateTimeOffset, getUtcDate, and sysUtcDateTime, detailing their capabilities and differences, providing a comprehensive overview of functions for retrieving date and time in different formats. Details the capabilities and differences of various datetime functions like currentTimeStamp, systemDateTimeOffset, getUtcDate, and sysUtcDateTime, offering a comprehensive overview of functions for retrieving date and time in different formats.']}], 'duration': 414.063, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6_95vbBrrXI/pics/6_95vbBrrXI510501.jpg', 'highlights': ['The chapter provides a clear explanation of UTC time and time zones, clarifying the difference and practical implications when changing dates.', 'A table called tblDatetime is created to demonstrate the practical storage of different datetime data types, including time, date, small datetime, and datetime, to showcase how the data gets stored.', 'Demonstrates updating the time zone offset in the datetime data type by setting a time zone offset of plus 1 hour, showcasing the practical usage of updating the time zone offset.', 'Explanation of various datetime functions like currentTimeStamp, systemDateTimeOffset, getUtcDate, and sysUtcDateTime, detailing their capabilities and differences, providing a comprehensive overview of functions for retrieving date and time in different formats.', 'The getDate function is used to return the current system date and time in SQL Server, which can be inserted into a table, and when executed, it returns the current system date and time.']}], 'highlights': ['Choosing the appropriate datetime data type is essential to optimize storage.', 'Date datatype occupies three bytes compared to eight bytes for datetime datatype.', 'Date time offset provides more precision for nanoseconds compared to date time.', 'UTC is the central time based on which the world regulates clocks and time.', 'GMT and UTC are synonymous with slight differences for all common purposes.', 'The time zone offset, usually in UTC time, is represented by plus or minus hours and minutes.', 'The UTC is the Coordinated Universal Time, serving as the world standard time for calculating times in different time zones.', "Examples of time calculations based on UTC are given, such as 12 o'clock in UTC being 13:00 in Germany and 17:30 in India.", 'London time is currently one hour ahead of UTC time due to daylight savings, resulting in a time difference of 21:19 UTC and 22:18 London time.', 'Explanation of time zones as UTC plus or minus hours, with an example of Central America being UTC minus 6 hours.', 'The chapter provides a clear explanation of UTC time and time zones, clarifying the difference and practical implications when changing dates.', 'A table called tblDatetime is created to demonstrate the practical storage of different datetime data types, including time, date, small datetime, and datetime, to showcase how the data gets stored.', 'Demonstrates updating the time zone offset in the datetime data type by setting a time zone offset of plus 1 hour, showcasing the practical usage of updating the time zone offset.', 'Explanation of various datetime functions like currentTimeStamp, systemDateTimeOffset, getUtcDate, and sysUtcDateTime, detailing their capabilities and differences, providing a comprehensive overview of functions for retrieving date and time in different formats.', 'The getDate function is used to return the current system date and time in SQL Server, which can be inserted into a table, and when executed, it returns the current system date and time.']}