SlideShare a Scribd company logo
1 of 19
Date and Time
Functions
CALENDAR
CALENDARAUTO
DATE
DATEDIFF
DATEVALUE
DAY
HOUR
MINUTE
MONTH
NOW
QUARTER
SECOND
TODAY
WEEKDAY
WEEKNUM
YEAR
By Mallikarjun Reddy
CALENDAR
Syntax:
CALENDAR(
<start_date>, <end_date>)
It returns a table with a single column name “Data” that
contains a continuous set of the dates.
Example:
CALENDAR(DATE(2012,01,01),DATE(2022,12,31)
CALENDAR(DATE(2012,01,01),TODAY())
By Mallikarjun Reddy
CALENDARAUTO
Syntax:
CALENDARAUTO(
[Fiscal Year End Month])
It returns a table with one column of dates calculated
from the model automatically.
<FiscalYearEndMonth> any DAX expression that returns
an integer from 1 to 12.
Example:
CALENDARAUTO() return all dates from Jan-10-2020 to
Dec -31-2022
CALENDARAUTO(3)- It returns dates from Mar-01-2020
to Feb 28-2022
By Mallikarjun Reddy
DATE
Syntax:
DATE(
<year>,<month>,<day>)
It returns the specified date and time
Example:
DATE(2021,01,01)
Out Put:-
01/01/2022 12:00:00 AM
By Mallikarjun Reddy
DATEDIFF
Syntax:
DATEDIFF(
<Date1>,<Date2>,<Interval>)
It return the datetime format between two dates, as you
specified in two dates.
Date1- It means Start datetime
Date2- End Datetime
Interval – SECOND, MINUTE, HOUR,DAY, WEEK,
MONTH, QUARTER,YEAR
Example:
DATEDIFF(DATE(2021,06,01),DATE(2022,07,31)
By Mallikarjun Reddy
DATEVALUE
Syntax:
DATEVALUE(date_text )
It converts the date in text format to Datetime format.
Example:
DATEVALUE(“08/01/2022”)
OUTPUT:-
01/08/2022 12:00:00 AM
By Mallikarjun Reddy
DAY
Syntax:
DAY(<date>)
It Returns the day of the month, a number from 1-31.
Example:
DAY(CalendarDim[Date])
By Mallikarjun Reddy
HOUR()
Syntax:
HOUR(<datetime>)
It Returns as hours a number from 0 to 23.
Example:
HOUR(CalendarDim[Date])
By Mallikarjun Reddy
MINUTE()
Syntax:
MINUTE(<datetime>)
It Returns as minute a number from 0 to 59.
Example:
MINUTE(CalendarDim[Date])
By Mallikarjun Reddy
MONTH()
Syntax:
MONTH(<datetime>)
It Returns the month as a number from 1(January) to
12(December).
Example:
MONTH(CalendarDim[Date])
By Mallikarjun Reddy
NOW()
Syntax:
NOW( )
It returns the current date and time in datetime format
Example:
NOW()
Out put:- 10/07/2022 14:45:00 PM
By Mallikarjun Reddy
QUARTER()
Syntax:
QUARTER(<date> )
It returns the quarter number as Integer number
From 1 to 4
Q1 (Jan to Mar) Q2(Apr to Jun)
Q3(July to Sep) Q4(Oct to Dec)
Example:
QUARTER(Calendar[Date])
By Mallikarjun Reddy
SECOND()
Syntax:
SECOND(<time>)
It Returns the seconds of time value, and returns number
from 0 to 59.
Example:
SECOND(CalendarDim[Date])
By Mallikarjun Reddy
TODAY
Syntax:
TODAY( )
It return the current date.
Example:
TODAY()
OUTPUT:-
10/07/2022 12:00:00 AM
By Mallikarjun Reddy
WEEKDAY()
Syntax:
WEEKDAY(
<date>,<return_type>)
It Returns weekday as integer number from
1(Sunday) to 7(Saturday).
Example:
WEEKDAY(CalendarDim[Date])
By Mallikarjun Reddy
WEEKNUM()
Syntax:
WEEKNUM(
<date>[,<return_type>])
It Returns week number as integer number from 1 to 52.
Example:
WEEKNUM(CalendarDim[Date])
By Mallikarjun Reddy
YEAR()
Syntax:
YEAR(<date>)
It Returns the year of date as a four digits integer number
Like 2020- 2022
Example:
YEAR(CalendarDim[Date])
By Mallikarjun Reddy
THANK YOU

More Related Content

Recently uploaded

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Recently uploaded (20)

Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
Naer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research SynthesisNaer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research Synthesis
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
Malaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMalaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptx
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Date and time functions.pptx