Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть How to Subtract Dates in SQL Server (Years, Days, Hours, Seconds)

  • Coding With Brett
  • 2022-03-10
  • 1692
How to Subtract Dates in SQL Server (Years, Days, Hours, Seconds)
  • ok logo

Скачать How to Subtract Dates in SQL Server (Years, Days, Hours, Seconds) бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно How to Subtract Dates in SQL Server (Years, Days, Hours, Seconds) или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку How to Subtract Dates in SQL Server (Years, Days, Hours, Seconds) бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео How to Subtract Dates in SQL Server (Years, Days, Hours, Seconds)

Here's a quick video to show you how to use the DATEDIFF function to subtract dates from each other in SQL Server's transact SQL.

00:00 - Using DATEDIFF
00:30 - Calculating a person's age
01:27 - Subtracting variables

How to use DATEDIFF with column values:

SELECT JobTitle, BirthDate, DATEDIFF(year, BirthDate, GETDATE()) AS 'Rough Age in Years'
FROM [AdventureWorks].[HumanResources].[Employee]

Just be aware that calculating somebody's age is not as straightforward as it looks. DATEDIFF passing in the 'year' parameter just calculates whole years and does not take leap years into account. It's OK as a rough calculation but if you need to precisely calculate a person's age then check out this article:

https://www.wiseowl.co.uk/blog/s216/c...

If you want to calculate differences between past/present and future dates then you can use a query like this:

SELECT DATEDIFF(minute, GETDATE(), '2022-12-31 23:59:59') AS 'Total Minutes Left in Year'

DATEDIFF reference: https://docs.microsoft.com/en-us/sql/...

If you found this video leave a LIKE and SUBSCRIBE for more coding videos.

Check out my SQL Programming playlist for more tutorials:    • SQL Programming  

Thumbnail photo credit: https://unsplash.com/@mpho_mojapelo

Stock footage credits: https://www.pexels.com/@jack-nicole-1..., https://www.pexels.com/@cottonbro

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]