No video

How to Use DateAdd, DateDiff, and DatePart to Calculate Dates in MS Access

  Рет қаралды 5,986

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

Пікірлер: 18
@jeffmwango
@jeffmwango 2 жыл бұрын
Ths is very informative and veery well explained. Thanks for sharing.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Glad it was helpful!
@ZahidKhan-mb6oc
@ZahidKhan-mb6oc 2 жыл бұрын
Very useful information, thanks my friend.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
I'm glad that worked for you!
@NoumanAzam01
@NoumanAzam01 Жыл бұрын
Very Informative, I watched whole video just to know if I can calculate age in "ddmmyy" format from Date of birth. Plz help me.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You can see how to calculate Age here: learn.microsoft.com/en-us/office/vba/access/concepts/date-time/calculate-age You probably need to convert your ddmmyy to a date variable type before you pass it to the function. You can do this using CDate(). Also, you may need to make your year a 4 digit year to be clear since auto conversion of "031202" may screw up.
@BambooCollege
@BambooCollege Жыл бұрын
Nice, but how can i add year and month and days at the same time.?
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Great question. Just use 3 DateAdd statements in a row.
@stanTrX
@stanTrX 7 ай бұрын
thanks Sean. do you think we can calculate the date difference between a date value and the previous date value of a table using query in ms access?
@seanmackenziedataengineering
@seanmackenziedataengineering 7 ай бұрын
Yes you can! When you look at the same field but a prior record, you can simulate what is called a "Window" function using Lag: kzbin.info/www/bejne/b5q2pnxpmbdqa9E
@stanTrX
@stanTrX 7 ай бұрын
it works like magic. thanks a lot Sean
@seanmackenziedataengineering
@seanmackenziedataengineering 7 ай бұрын
@@stanTrX awesome!
@BambooCollege
@BambooCollege Жыл бұрын
Like 3year and 5monthe and 11 days. what should i do now.?
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You can add three statements in a row. First, year, then month, then days. Increment your variable each time. ie: dteNow = Now() dteCalc = DateAdd("yyyy", 3, dteNow) dteCalc = DateAdd("m", 4, dteCalc) dteCalc = DateAdd("d", 11, dteCalc)
@gerfer6261
@gerfer6261 2 жыл бұрын
☑️
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Glad that worked!
@MrKenCollectibles
@MrKenCollectibles Жыл бұрын
I'm new to using MS Access. I need to find a way to update a field with a new date when another field is changed. Did I miss something in this video. Any assistance would be greatly appreciated
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You can use the After Update event in your form for the field you will change. This is Before Update but it is similar: kzbin.info/www/bejne/gHe8eWqjotSFldU If the other field is in another table, you can use a data macro: kzbin.info/www/bejne/jXq6o4CsoNhkjdE
How to Use Left, Right, Mid, Instr, and Trim on Strings in MS Access and VBA
15:59
Sean MacKenzie Data Engineering
Рет қаралды 7 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 52 МЛН
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 27 МЛН
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 15 МЛН
How to Calculate DUE DATE Excluding Weekends and Holiday in Ms Access
15:47
How to Retrieve Any Column Value from a Combo Box or List Box in Microsoft Access
19:12
Sean MacKenzie Data Engineering
Рет қаралды 14 М.
Calculations with Dates in QUERIES | Access
10:23
Education with Mr Hambury
Рет қаралды 8 М.
Use One Function to Handle Many Form Events in MS Access
10:49
Sean MacKenzie Data Engineering
Рет қаралды 1,2 М.
Microsoft Access Times as a Duration HH:NN possibly exceeding 24 hours
13:40
Computer Learning Zone
Рет қаралды 9 М.
Microsoft Access Number of Days Between Two Dates    DATEDIFF Function    Date Difference
9:02
DON GICHAI -The Computer guy
Рет қаралды 3,1 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 52 МЛН