📊 Curso Google Sheets ✅ Funciones de fecha, HOY, AHORA, FECHA, DAYS, SIFECHA, DIA.LAB...
Google Sheets Date Functions Overview
Introduction to Date Functions
- The video focuses on exploring date functions in Google Sheets, continuing from previous lessons on various function types.
- A specific spreadsheet is used for demonstration, which includes three sheets dedicated to mathematical, text, and date functions.
Extracting Date Components
- The presenter demonstrates how to extract individual components of a date (day, month, year) using the
DAY,MONTH, andYEARfunctions.
- To extract the day from a start date in cell C2, the function is accessed via the function icon and requires either manual input or a cell reference.
- Similar steps are followed for extracting the month and year; each component can be referenced directly from the corresponding cell.
Handling Time Components
- The process for extracting hours, minutes, and seconds follows the same method as before using respective time functions.
- If no specific time is provided when entering a date, default values of zero will appear for these components until modified. Formatting adjustments may be necessary to display time correctly.
Current Date and Time Functions
Function: TODAY()
- The
TODAY()function retrieves the current date without requiring any parameters; it updates automatically whenever changes occur in the sheet.
- Users should note that this function always reflects today's date regardless of when it was last accessed or edited.
Function: NOW()
- Similarly, the
NOW()function provides both current date and time; it also updates with any changes made within the document.
- Settings allow users to choose how frequently these functions update—either upon changes or at specified intervals (e.g., every minute).
Creating Dates with Specific Parameters
Function: DATE()
- The
DATE()function constructs a valid date based on specified year, month, and day parameters taken from designated cells or entered manually as numbers.
- This allows flexibility in generating dates dynamically based on user-defined inputs rather than fixed values only.
Calculating Differences Between Dates
Function: DATEDIF()
Understanding Date Functions in Excel
Key Date Functions Explained
- The process begins with setting the end date and start date using cell references, specifically noting that the difference in days between these two dates can be calculated.
- The EOMONTH function is introduced, which returns the last day of a month based on a specified date. It requires two parameters: a starting date and the number of months to add.
- If zero is inputted as the second parameter, it returns the last day of the current month. For example, entering 1 retrieves the last day of the next month (June 30).
- A negative value can also be used; for instance, -1 calculates the last day of the previous month (April 30). This highlights flexibility in calculating end-of-month dates.
- The DATEDIF function is discussed next, allowing users to calculate differences between two dates in days, months, or years by specifying three arguments: start date, end date, and unit type.
Practical Applications of Date Functions
- When using DATEDIF, it's important to follow parameter prompts indicated by green text in Excel for clarity on what data to input next.
- Different units can be specified: "d" for days, "m" for months, and "y" for years. This allows users to customize their calculations based on needs.
- The WEEKDAY function is introduced to return a numeric representation of a specific day's position within a week.
- Users can specify which day should be considered as the first day of the week; by default Sunday is set as such. For example, if Tuesday is selected it will return 3.
Formatting Dates and Days
- There are options available to modify how dates are displayed in Excel through formatting settings. Users can choose from pre-designed formats or create custom ones.
- Customization includes adding leading zeros or displaying full names for days (e.g., changing from numerical format to textual format like "Tuesday").
Advanced Date Calculations
- The WORKDAY function calculates future dates based on working days while excluding weekends and holidays.