Comparing Dates in Power Automate - Data and Graphing Activities with Solutions

Master comparing dates in Power Automate: date functions, comparison methods, and workflow concepts through these 10 detailed exercises.

Solutions: Exercises 1 to 10
1 Date Creation
Exercise 1
How do I create a date for March 15, 2024 in Power Automate?
Difficulty: Beginner Time: ~3 minutes Skills: Date Functions, Power Automate Syntax
Definition:

Date creation in Power Automate: Using the formatDateTime function or ISO date strings to represent specific dates.

Note: Power Automate works with ISO 8601 format: YYYY-MM-DDTHH:mm:ssZ

Step-by-step date creation:
  1. Use formatDateTime() function with date string
  2. Use ISO 8601 format: "YYYY-MM-DD"
  3. Store the result in a variable or use directly
Function
formatDateTime('2024-03-15')
Result
March 15, 2024
Step 1: Create date string

Use the string '2024-03-15' in formatDateTime function.

Step 2: Execute the function

Power Automate processes the date string.

Step 3: Verify result

The result shows March 15, 2024 in the appropriate format.

formatDateTime('2024-03-15')
formatDateTime('2024-03-15') creates March 15, 2024.
Final answer:

Use formatDateTime('2024-03-15') to create March 15, 2024.

Applied rules:

• ISO format: Use YYYY-MM-DD for date strings

• Hyphen separator: Separate year, month, day with hyphens

• Zero-padding: Months and days should be two digits

• Practice Tip: Remember Y-M-D order for date strings

Related Examples:
  • formatDateTime('2023-12-25') -- Christmas 2023
  • formatDateTime('2024-01-01') -- New Year 2024
  • formatDateTime('2024-10-31') -- Halloween 2024
Quick Tips:
  • Always use YYYY-MM-DD format for date strings
  • Pad single-digit months and days with zeros
  • Power Automate handles leap years automatically
Frequently Asked Questions:

Q: What if I use an invalid date?
A: Power Automate will return an error. For example, formatDateTime('2024-02-30') fails because February doesn't have 30 days.

Q: Can I include time in the date string?
A: Yes! Use ISO 8601 format: formatDateTime('2024-03-15T14:30:00Z') for date and time.

2 Date Comparison
Exercise 2
How do I compare two dates in Power Automate? Is March 15, 2024 earlier than March 20, 2024?
Difficulty: Beginner Time: ~3 minutes Skills: Date Comparison, Flow Logic
Definition:

Date comparison: Using comparison functions like less() or greater() to determine the relationship between two dates in Power Automate.

Note: Power Automate compares dates based on their internal representation.

Step-by-step comparison method:
  1. Create two date expressions
  2. Use comparison function (less, greater, equals)
  3. Evaluate the boolean result
Dates
March 15 vs March 20
Comparison
True
Step 1: Create comparison expression

less(formatDateTime('2024-03-15'), formatDateTime('2024-03-20'))

Step 2: Execute the function

Power Automate evaluates the comparison and returns true/false.

Step 3: Interpret result

Since March 15 is before March 20, the result is true.

less(formatDateTime('2024-03-15'), formatDateTime('2024-03-20'))
less('2024-03-15', '2024-03-20') returns true.
Final answer:

Yes, March 15, 2024 is earlier than March 20, 2024.

Applied rules:

• Comparison functions: Use less(), greater(), equals() for comparisons

• Boolean result: Comparison returns true or false

• Chronological order: Earlier dates are less than later dates

• Practice Tip: Test with known date relationships first

Related Examples:
  • less(formatDateTime('2024-01-01'), formatDateTime('2024-12-31')) -- returns true
  • greater(formatDateTime('2024-05-15'), formatDateTime('2024-03-10')) -- returns true
  • equals(formatDateTime('2024-04-01'), formatDateTime('2024-04-01')) -- returns true
Quick Tips:
  • less() means "is earlier than", greater() means "is later than"
  • Power Automate stores dates as numbers internally for comparison
  • Time components matter in date comparisons if present
Frequently Asked Questions:

Q: What comparison functions can I use?
A: You can use less(), greater(), equals(), lessOrEquals(), greaterOrEquals().

Q: Does time matter in date comparison?
A: Yes! If dates include time, Power Automate compares both date and time components.

3 Greater Than
Exercise 3
Is June 10, 2024 greater than March 15, 2024 in Power Automate? Use the greater() function.
Difficulty: Beginner Time: ~4 minutes Skills: Date Comparison, Greater Than, Flow Functions
Definition:

Greater than: Function that returns true if the first operand is later in time than the second operand.

Note: For dates, "greater than" means chronologically later.

Step-by-step greater than method:
  1. Create two date expressions
  2. Use the greater() function between them
  3. Evaluate the boolean result
Dates
June 10 vs March 15
Result
True
Step 1: Create comparison expression

greater(formatDateTime('2024-06-10'), formatDateTime('2024-03-15'))

Step 2: Execute the function

Power Automate evaluates the comparison and returns true.

Step 3: Interpret result

Since June 10 is after March 15, the result is true.

greater(formatDateTime('2024-06-10'), formatDateTime('2024-03-15'))
greater('2024-06-10', '2024-03-15') returns true.
Final answer:

Yes, June 10, 2024 is greater than March 15, 2024.

Applied rules:

• Greater than: greater() function returns true if left date is later

• Chronological logic: Later dates are greater than earlier dates

• Boolean evaluation: Result is always true or false

• Practice Tip: Think of the number line for date ordering

Related Examples:
  • greater(formatDateTime('2024-12-31'), formatDateTime('2024-01-01')) -- returns true
  • greater(formatDateTime('2024-08-15'), formatDateTime('2024-08-10')) -- returns true
  • greater(formatDateTime('2024-02-01'), formatDateTime('2024-12-31')) -- returns false
Quick Tips:
  • greater() means "comes later in time"
  • Think of dates on a timeline from left to right
  • Any date in June > any date in March of the same year
Frequently Asked Questions:

Q: What if I compare dates in different years?
A: The year is considered first, then month, then day. greater('2023-12-31', '2024-01-01') returns false.

Q: Can I chain multiple comparisons?
A: Yes! You can use expressions like greater(date1, date2) and greater(date2, date3).

Solutions: Exercises 4 to 5
4 Less Than
Exercise 4
Is January 1, 2024 less than February 14, 2024 in Power Automate? Use the less() function.
Definition:

Less than: Function that returns true if the left operand is earlier in time than the right operand.

Note: For dates, "less than" means chronologically earlier.

Step-by-step less than method:
  1. Create two date expressions
  2. Use the less() function between them
  3. Evaluate the boolean result
Dates
Jan 1 vs Feb 14
Result
True
Step 1: Create comparison expression

less(formatDateTime('2024-01-01'), formatDateTime('2024-02-14'))

Step 2: Execute the function

Power Automate evaluates the comparison and returns true.

Step 3: Interpret result

Since January 1 is before February 14, the result is true.

less(formatDateTime('2024-01-01'), formatDateTime('2024-02-14'))
less('2024-01-01', '2024-02-14') returns true.
Final answer:

Yes, January 1, 2024 is less than February 14, 2024.

Applied rules:

• Less than: less() function returns true if left date is earlier

• Chronological logic: Earlier dates are less than later dates

• Boolean evaluation: Result is always true or false

• Practice Tip: Remember: less() means "earlier than"

Related Examples:
  • less(formatDateTime('2024-01-01'), formatDateTime('2024-12-31')) -- returns true
  • less(formatDateTime('2024-05-01'), formatDateTime('2024-05-15')) -- returns true
  • less(formatDateTime('2024-10-31'), formatDateTime('2024-09-15')) -- returns false
Quick Tips:
  • less() means "comes earlier in time"
  • Think of the calendar year from January to December
  • Any date in January < any date in February of the same year
Frequently Asked Questions:

Q: What happens if I compare the same dates?
A: less('2024-05-01', '2024-05-01') returns false since they're equal.

Q: Can I use lessOrEquals() for "less than or equal"?
A: Yes! lessOrEquals('2024-05-01', '2024-05-01') returns true.

5 Equal Dates
Exercise 5
Are March 15, 2024 and March 15, 2024 equal in Power Automate? Use the equals() function.
Definition:

Equality: Function that returns true if both operands represent the same date and time.

Note: For dates, equality means identical year, month, and day.

Step-by-step equality method:
  1. Create two date expressions
  2. Use the equals() function between them
  3. Evaluate the boolean result
Dates
March 15 vs March 15
Result
True
Step 1: Create comparison expression

equals(formatDateTime('2024-03-15'), formatDateTime('2024-03-15'))

Step 2: Execute the function

Power Automate evaluates the comparison and returns true.

Step 3: Interpret result

Since both dates are identical, the result is true.

equals(formatDateTime('2024-03-15'), formatDateTime('2024-03-15'))
equals('2024-03-15', '2024-03-15') returns true.
Final answer:

Yes, March 15, 2024 and March 15, 2024 are equal.

Applied rules:

• Equality: equals() function returns true if dates are identical

• Exact match: Year, month, and day must all match

• Boolean evaluation: Result is always true or false

• Practice Tip: Use equals() to check for specific dates

Related Examples:
  • equals(formatDateTime('2024-12-25'), formatDateTime('2024-12-25')) -- returns true
  • equals(formatDateTime('2024-01-01'), formatDateTime('2023-01-01')) -- returns false
  • equals(formatDateTime('2024-07-04'), formatDateTime('2024-07-04')) -- returns true
Quick Tips:
  • equals() checks for exact date match
  • Year, month, and day must all be the same
  • Use for validating specific dates like birthdays
Frequently Asked Questions:

Q: What if dates have different times?
A: If you include time components, they must also match for equality.

Q: Can I check inequality?
A: Yes! Use not(equals(date1, date2)) to check for inequality.

Solutions: Exercises 6 to 10
6 Current Date Function
Exercise 6
How do I get today's date in Power Automate and compare it with March 10, 2024?
Definition:

utcNow function: Returns the current date and time in Power Automate. Updates automatically each time the flow runs.

Note: utcNow() takes no arguments and returns the current date/time in ISO format.

Step-by-step current date method:
  1. Use utcNow() in an expression
  2. Compare with another date using comparison functions
  3. Power Automate evaluates the comparison based on current date
Function
utcNow()
Comparison
Variable
Step 1: Get current date

Use utcNow() to get the current date and time.

Step 2: Compare with another date

Use less(utcNow(), formatDateTime('2024-03-10')) to compare.

Step 3: Evaluate result

Result depends on when you run the flow.

utcNow()
utcNow() returns current date; comparison depends on current date.
Final answer:

Use utcNow() to get today's date and compare with other dates.

Applied rules:

• utcNow function: No arguments needed, returns current date/time

• Dynamic update: Changes automatically each time flow runs

• Comparison logic: Works with all comparison functions

• Practice Tip: Use for relative date comparisons

Related Examples:
  • less(utcNow(), formatDateTime('2025-01-01')) -- checks if today is before 2025
  • equals(utcNow(), formatDateTime('2024-03-15')) -- checks if today is March 15, 2024
  • greater(utcNow(), formatDateTime('2023-12-31')) -- checks if today is after 2023
Quick Tips:
  • utcNow() updates automatically each time flow executes
  • Use for calculating days until future dates
  • Combine with other functions for complex date logic
Frequently Asked Questions:

Q: When does utcNow() update?
A: It updates automatically each time the flow is executed.

Q: Can I get just the date part?
A: Use formatDateTime(utcNow(), 'yyyy-MM-dd') to get only the date.

7 Date Difference
Exercise 7
How many days are between March 10, 2024 and March 20, 2024 in Power Automate?
Definition:

Date difference: Calculating the number of days between two dates using Power Automate functions.

Note: Power Automate provides functions to calculate date differences.

Step-by-step date difference:
  1. Create two date expressions
  2. Use the ticks() function to get time in ticks
  3. Subtract and convert ticks to days
Date Range
March 10 to March 20
Days Difference
10 days
Step 1: Get ticks for both dates

ticks(formatDateTime('2024-03-20')) and ticks(formatDateTime('2024-03-10'))

Step 2: Calculate difference in ticks

Subtract earlier date ticks from later date ticks

Step 3: Convert to days

Divide by 864000000000 to get days (ticks per day)

div(sub(ticks('2024-03-20T00:00:00Z'), ticks('2024-03-10T00:00:00Z')), 864000000000)
The difference between March 10 and March 20, 2024 is 10 days.
Final answer:

There are 10 days between March 10, 2024 and March 20, 2024.

Applied rules:

• Subtraction: Later date ticks minus earlier date ticks

• Conversion: Divide by 864000000000 to get days

• Positive result: Always subtract earlier from later for positive difference

• Practice Tip: Remember: 1 day = 86400 seconds = 864000000000 ticks

Related Examples:
  • div(sub(ticks('2024-01-10T00:00:00Z'), ticks('2024-01-01T00:00:00Z')), 864000000000) -- returns 9
  • div(sub(ticks('2024-12-25T00:00:00Z'), ticks('2024-12-01T00:00:00Z')), 864000000000) -- returns 24
  • div(sub(ticks('2025-01-01T00:00:00Z'), ticks('2024-12-31T00:00:00Z')), 864000000000) -- returns 1
Quick Tips:
  • Subtract earlier date from later date for positive result
  • Power Automate handles leap years automatically in calculations
  • For inclusive ranges, add 1 to the result
Frequently Asked Questions:

Q: What if I subtract a later date from an earlier date?
A: You get a negative number. div(sub(ticks('2024-03-10'), ticks('2024-03-20')), 864000000000) returns -10.

Q: Does Power Automate account for leap years in differences?
A: Yes, Power Automate handles leap years automatically when calculating date differences.

8 Age Calculation
Exercise 8
How do I calculate someone's age in years if they were born on January 1, 2010 and today is January 1, 2024 in Power Automate?
Definition:

Age calculation: Determining the number of complete years between a birth date and a reference date.

Note: Use date difference calculations to determine age in Power Automate.

Step-by-step age calculation:
  1. Create birth date and reference date expressions
  2. Calculate the difference in days
  3. Divide by 365 to get approximate years
Birth Date
Jan 1, 2010
Reference Date
Jan 1, 2024
Age
14 years
Step 1: Calculate days difference

div(sub(ticks(utcNow()), ticks('2010-01-01T00:00:00Z')), 864000000000)

Step 2: Convert to years

Divide by 365 to get approximate years: days / 365

Step 3: Interpret result

The person is 14 years old on January 1, 2024.

div(sub(ticks(utcNow()), ticks('2010-01-01T00:00:00Z')), 864000000000)
Age = 14 years (born January 1, 2010; reference date January 1, 2024).
Final answer:

The person is 14 years old on January 1, 2024.

Applied rules:

• Days difference: Calculate using ticks() function

• Year conversion: Divide by 365 to get approximate years

• Age calculation: Use reference date minus birth date

• Practice Tip: Use current date for dynamic age calculations

Related Examples:
  • div(sub(ticks('2024-01-02T00:00:00Z'), ticks('2010-01-01T00:00:00Z')), 864000000000*365) -- returns 14
  • div(sub(ticks('2024-01-01T00:00:00Z'), ticks('2010-06-15T00:00:00Z')), 864000000000*365) -- returns 13 (birthday not passed)
  • div(sub(ticks('2024-01-01T00:00:00Z'), ticks('2010-12-31T00:00:00Z')), 864000000000*365) -- returns 13 (birthday not passed)
Quick Tips:
  • Use ticks() to calculate precise date differences
  • Birth date comes second in subtraction
  • For current age, use utcNow() as reference date
Frequently Asked Questions:

Q: What if the birthday hasn't passed this year?
A: The calculation gives the age as of the reference date. For complete years, you'd need to check if birthday has passed.

Q: Can I get months too?
A: Yes! Divide by 30.44 to get approximate months: days / 30.44.

9 Leap Years
Exercise 9
How do I check if 2024 is a leap year in Power Automate?
Definition:

Leap year: A year that has 366 days instead of 365, with February having 29 days instead of 28.

Note: Occurs every 4 years, except for years divisible by 100 but not by 400.

Step-by-step leap year check:
  1. Try to create February 29 of that year
  2. Check if the date is valid
  3. If valid, it's a leap year; if invalid, it's not
Year
2024
Is Leap Year
Yes
Step 1: Try to create Feb 29

formatDateTime('2024-02-29')

Step 2: Check validity

If Power Automate accepts the date, 2024 is a leap year.

Step 3: Verify result

Since 2024 is divisible by 4 and not by 100, it's a leap year.

formatDateTime('2024-02-29')
2024 is a leap year (February 29 exists).
Final answer:

Yes, 2024 is a leap year.

Applied rules:

• Leap year rule: Divisible by 4, except century years not divisible by 400

• Validation method: Try creating Feb 29 to test leap year

• Boolean result: Returns success/failure based on date validity

• Practice Tip: Use for date validation and calendar operations

Related Examples:
  • formatDateTime('2024-02-29') -- Valid (returns date)
  • formatDateTime('2023-02-29') -- Invalid (returns error)
  • formatDateTime('2000-02-29') -- Valid (divisible by 400)
  • formatDateTime('1900-02-29') -- Invalid (divisible by 100, not 400)
Quick Tips:
  • Remember: "Every 4 years" with century exceptions
  • Use date validation to check for leap year status
  • Century years must be divisible by 400 to be leap years
Frequently Asked Questions:

Q: Do all countries have the same leap year rules?
A: Yes, the Gregorian calendar rules are standardized worldwide.

Q: What if a holiday falls on a leap day?
A: February 29 only exists in leap years, so some holidays may shift to Feb 28 or Mar 1 in non-leap years.

10 Date Formatting
Exercise 10
How do I format a date as "March 15, 2024" in Power Automate?
Definition:

Date formatting: Converting a date value to a string representation in a specific format using formatDateTime function.

Note: Use format masks to specify the desired output format.

Step-by-step date formatting:
  1. Create a date value
  2. Use formatDateTime function with the date and format mask
  3. Specify month, day, and year formatting
Input
formatDateTime('2024-03-15')
Formatted
"March 15, 2024"
Step 1: Create date value

Use formatDateTime('2024-03-15') to create the date.

Step 2: Format the date

Use formatDateTime with 'MMMM dd, yyyy' format mask.

Step 3: Use the formatted string

The result is "March 15, 2024".

formatDateTime('2024-03-15T00:00:00Z', 'MMMM dd, yyyy')
formatDateTime('2024-03-15T00:00:00Z', 'MMMM dd, yyyy') returns "March 15, 2024".
Final answer:

Use formatDateTime('2024-03-15T00:00:00Z', 'MMMM dd, yyyy') to format as "March 15, 2024".

Applied rules:

• Format mask: MMMM dd, yyyy shows full month name, day, and year

• formatDateTime function: Converts date to formatted string

• Case sensitivity: Format elements must match exactly

• Practice Tip: Use different format masks for various date presentations

Related Examples:
  • formatDateTime('2024-12-25T00:00:00Z', 'MM/dd/yyyy') -- "12/25/2024"
  • formatDateTime('2024-07-04T00:00:00Z', 'dddd, MMMM d') -- "Friday, July 4"
  • formatDateTime('2024-01-01T00:00:00Z', 'yyyy-MM-dd') -- "2024-01-01"
Quick Tips:
  • MMMM = Full month name (March)
  • MMM = Abbreviated month (Mar)
  • MM = Month number with leading zero (03)
  • dd = Day with leading zero (15)
  • yyyy = 4-digit year (2024)
Frequently Asked Questions:

Q: What are other common format masks?
A: MM/dd/yyyy, yyyy-MM-dd, MMMM dd, yyyy, and many more.

Q: Can formatting affect date comparison?
A: No, formatting only affects the string representation. The underlying date value remains unchanged.

Detailed Summary: Comparing Datasets in Power Automate

Definition: Comparing datasets in Power Automate involves using date functions and comparison operators to determine relationships between dates. This is fundamental for workflow automation that needs to order events, calculate durations, or validate date ranges.

Core Concepts:

  • Date functions: Using formatDateTime(), utcNow(), ticks() for date operations
  • Comparison functions: Using less(), greater(), equals() for direct date comparison
  • ISO 8601 format: Standard date format used by Power Automate: YYYY-MM-DD
  • Date difference: Calculating duration between two dates using ticks
  • Date formatting: Converting date values to string representations

Key Rules and Laws:

  • Creation rule: Use formatDateTime('YYYY-MM-DD') for date literals
  • Comparison rule: Earlier dates are less than later dates
  • Time storage: Dates are stored as ticks (100-nanosecond intervals)
  • Month indexing: Month numbers are 1-12 (not 0-11)

Step-by-Step Methods:

  1. Create Date: Use formatDateTime() with 'YYYY-MM-DD' format
  2. Compare dates: Use functions like less(), greater(), equals()
  3. Calculate difference: Use ticks() function and convert to days
  4. Format output: Use formatDateTime() with format mask

Examples (Simple to Advanced):

  • Simple: formatDateTime('2024-01-01') -- January 1, 2024
  • Medium: less(formatDateTime('2024-01-01'), formatDateTime('2024-12-31')) -- returns true
  • Advanced: div(sub(ticks(utcNow()), ticks('2010-01-01T00:00:00Z')), 864000000000*365) -- calculates age

Tips and Tricks:

  • Memory Tip: Remember YYYY-MM-DD format for date strings
  • Comparison Tip: less() means "earlier than", greater() means "later than"
  • Validation Tip: Always verify date formats match expected pattern
  • Formatting Tip: Use formatDateTime() for consistent date presentations

Common Pitfalls:

  • Using wrong format in date strings
  • Confusing comparison functions (less vs greater)
  • Not accounting for leap years in calculations
  • Incorrect format masks causing unexpected output

Key Notes for Memorization:

  • Remember: Date format is Year-Month-Day
  • Practice: Test date comparisons with known values
  • Visualize: Think of dates on a timeline from left to right
  • Connect: Relate to real calendar concepts you know
Key Laws, Methods, Rules, and Definitions
date1 < date2 → earlier
Date Comparison
Key definitions:

Comparing datasets in Power Automate: Using date functions and comparison methods to determine which date occurs earlier or later in the calendar sequence

Date functions: Functions like formatDateTime, utcNow, ticks that work with date values

Comparison methods: Functions like less(), greater(), equals() that return boolean values

Complete methodology:
  1. Create Date: Use formatDateTime() with 'YYYY-MM-DD' format
  2. Compare dates: Use functions like less(), greater(), equals()
  3. Calculate differences: Use ticks() function for precise calculations
  4. Format output: Convert to string using formatDateTime() with mask
Tip 1: Always use YYYY-MM-DD format for date strings.
Tip 2: Use equals() for exact date comparison.
Tip 3: Use ticks() for date difference calculations.
Tip 4: Always validate date formats match expected pattern.
Common errors: Wrong format in date strings, invalid dates, mismatched format masks.
Exam preparation: Practice formatDateTime(), comparison functions, and basic date calculations.
Rules to remember:

• Literal format: Use formatDateTime('YYYY-MM-DD') with hyphen separators

• Comparison rule: Earlier dates are before later dates

• Equality rule: Use equals() for date comparison

• Time rule: Date values include time components by default

• Formatting rule: Use formatDateTime() with format mask for string representation

Rules and Methods for Comparing Datasets in Power Automate
date1 < date2 → earlier
Date Comparison
Date Functions
Comparison Functions
Current Date
Date Calculations
Date Formatting

Key Takeaways

  • Use formatDateTime('YYYY-MM-DD') for date creation
  • Use less(), greater(), equals() for date comparisons
  • Use ticks() for precise date difference calculations
  • Use formatDateTime() with format masks for string representation
  • Always validate date formats match expected patterns

Questions & Answers

Question: What is Power Automate and why do we use it for dates?

Answer: Power Automate is Microsoft's workflow automation tool that excels at handling dates:

  • Easy creation: formatDateTime('2024-03-15') creates March 15, 2024
  • Simple comparison: less('2024-01-01', '2024-12-31') gives true
  • Powerful features: Calculate differences, format display, validate dates
  • Reliable: Handles leap years and month lengths automatically

Power Automate's date functions make working with dates safe and easy!

Example: formatDateTime('2024-02-29') works because 2024 is a leap year.

Question: My child is in 1st grade - why are they learning Power Automate?

Answer: While 1st graders don't typically learn Power Automate, introducing workflow concepts can be beneficial:

  • Logical thinking: Understanding sequences and patterns
  • Problem solving: Breaking problems into steps
  • Math connections: Workflow operations reinforce math concepts
  • Future skills: Basic understanding of automation concepts

However, actual Power Automate would be too advanced for 1st grade. This content might be better suited for older students learning about date concepts in automation.

Tip: Focus on calendar skills, date sequencing, and time concepts in 1st grade, then introduce workflow tools later.

Question: What does formatDateTime('2024-03-15') mean? It looks like a big word!

Answer: formatDateTime('2024-03-15') is like a computer instruction that says "create the date March 15, 2024!" It's like a special command:

  • formatDateTime: The function that creates the date
  • '2024-03-15': The date as a string (year-month-day)
  • 2024: The year (like 2024 AD)
  • 03: The month (March is the 3rd month)
  • 15: The day (the 15th day)

Think of it like giving a computer exact instructions for a date: year-month-day!

Practice tip: Remember the format is YYYY-MM-DD with hyphens!

Power Automate Date Glossary

formatDateTime Function
A Power Automate function that converts a date string to a formatted date value or changes the format of an existing date.
utcNow Function
A Power Automate function that returns the current date and time in UTC format.
Comparison Function
Functions like less(), greater(), equals() used to compare values. For dates, they compare chronological order.
ticks Function
A function that returns the number of ticks (100-nanosecond intervals) since January 1, 0001 for a date value.
ISO 8601 Format
The international standard date format used by Power Automate: YYYY-MM-DD for dates.

Math Learning Educational Team

Certified Elementary Math Educators & Power Platform Specialists

Our team combines elementary education expertise with workflow automation knowledge to create unique learning experiences that bridge traditional math concepts with modern automation tools. All content is designed to align with educational best practices while introducing automation concepts in an accessible way.

Learning Objectives

  • Understand formatDateTime function and date creation
  • Use comparison functions to evaluate date relationships
  • Calculate date differences using ticks function
  • Format dates using formatDateTime with format masks
  • Solve problems involving date comparisons and calculations

Power Automate Date Comparison Guide

Date Creation
formatDateTime('YYYY-MM-DD')
Year-Month-Day
Comparison Functions
📅
less, greater, equals
Compare dates
Date Operations
📅 - 📅 = 📏
ticks function
Days calculation
Earlier
formatDateTime('2024-01-01')
less than
vs
Later
formatDateTime('2024-12-31')
Result: True
Date Value
Comparison
Power Automate Date Operations
Create
Compare
Calculate
Format