Excel VBA Introduction Part 58.10 - SQL for Excel Files - Date Expressions

preview_player
Показать описание


This video teaches you how to write calculations with dates in your SQL queries for Excel files. You'll learn how to format dates using the FormatDateTime and Format functions, how to extract parts of dates using the Year, Month, MonthName, Day, Weekday, WeekdayName and DatePart functions and how to create a date from other values using the DateSerial and DateValue functions. You'll also learn how to create calculations based on the current date using the Date and Now functions, how to calculate past or future dates using the DateAdd function and how to calculate the difference between dates using the DateDiff function.

Chapters
00:00 Topic List
00:41 The Basic Setup
03:05 Formatting Dates
05:35 A Difference in Data Types
07:31 The Format Function
09:13 Custom Date Formats
11:27 Calculating Year, Month, Day and Weekday
13:35 Calculating Month Names
15:27 Calculating Weekday Names
18:46 The DatePart Function
20:44 Constructing a Date with DateSerial
23:19 Converting Text to Date with DateValue
25:43 Writing Dates in Criteria
29:21 Using Date Functions in Criteria
31:30 Using Date Functions to Sort Results
32:31 Calculating the Current Date and Time
35:12 Criteria Based on the Current Date
36:29 The DateAdd Function
39:57 Calculating Future Dates
42:49 Calculating the Difference Between Dates
44:58 DateDiff Does Not Calculate Age
46:24 Calculating Age in Years
50:34 Combining Functions in One Expression
52:50 What's Next?

Рекомендации по теме
Комментарии
Автор

You provide a wealth of scientific material. Thanks for the great content.

youssefsedkey
Автор

you are hero. whenever i need some convert data especially date, hour etc, this video always key for me. Thank you so much

onurtunc
Автор

Thanks Andrew. Very cool stuff this SQL.

krn
Автор

Amazing and very impressive. Thank you very much.

KhalilYasser
Автор

Much obliged for the video. It’s very useful and well explained as for usual. 👍 I’m looking forward to new in the series.🙂

sebastian
Автор

Thank you very much, Andrew. This is so great, what I've been looking for.

VillaOuk
Автор

Hi Andrew I was really looking forward to this one and you didn't disappoint, brilliant tutorial very useful thank you so much, I can also apply the tools and principles I have learned to fix my own problems, thank you as always 👏👌🥷

frikduplessis
Автор

Hi Andrew, thank you so much for amazing video. Any plans on Making videos on Triggers in SQL?

tejamarneni
Автор

Would you be able to go through the function/ techniques that we can use for Time as well? Thank you!!

joelwong
Автор

hi, How can I use the isowk function? It calculates the week number incorrectly.(ww => isoww)

umutapaydin
Автор

Dear Sir
Kindly guide whether the functions used in this series like IIF, IsNull, Switch, Format, Year, DateSerial etc. are native functions of SQL or Excel VBA. If they are functions from SQL, kindly suggest if there is any documentation regarding all the functions of SQL.

chaitanyajoshi
Автор

Dear Andy, we need to know -In a more detailed way, as always-(when and how) to use (watch window and locals window)? thanks, advance.

youssefsedkey
Автор

Hi adam can you help me with a code to add SL numbers automatically to excel database record set.... These numbers will help me to edit that row number values

safeerahmed
visit shbcf.ru