Cómo utilizar la función HOY en las Hojas de cálculo de Google

The Google Sheets TODAY function returns the current date and time, based on the user’s computer settings. It’s a dynamic or “volatile” Google Sheets function, meaning that it recalculates automatically.

The TODAY function is a useful way to keep dates in your spreadsheet current, regardless of when you first entered the date in your spreadsheet. It can also be combined with multiple other functions.

Sintaxis

Unlike most other functions that Google Sheets offers, this one doesn’t take in any input parameters. Trying to add them will result in an error.

=HOY()

Cómo utilizar la función HOY en las Hojas de cálculo de Google

This is one of the most straightforward functions available within Google Sheets.

You can use it as a standalone function, or you can make this an input parameter to other existing functions as shown in the image below.

TODAY function in Google Sheets 1

The first few examples show the TODAY function in its most basic form. By typing =TODAY() into a cell, you can get today’s date.

For Google Sheets the unit of measure is days, meaning there is a direct correlation between days and whole numbers. This is a little abstract, but the important thing to understand is that you can make google sheets add days to date.

For example, to find out what is 365 days from today, you would simply add 365 to TODAY.

=TODAY()+365

39

Automatice las transferencias de datos más allá de Importrange

Descubra cómo

Combining TODAY with other functions

TODAY is pretty versatile and you can combine it with a few other functions to get different results. This is shown in the examples below.

TODAY function in Google Sheets 2

Su contenido va aquí. Edite o elimine este texto en línea o en la configuración del módulo Contenido. También puede aplicar estilo a todos los aspectos de este contenido en los ajustes de diseño del módulo e incluso aplicar CSS personalizado a este texto en los ajustes avanzados del módulo.

=EOMONTH(TODAY(),1)

EOMONTH stands for “end of the month”. This function returns the date of the last day in a month given a starting date and a month offset.

In simpler terms, the formula above returns the date of the end of next month. If this was used in January 2024, the formula would return the date “02/28/2024”.

I’m using the TODAY function as the reference date, and the 1 instructs the function to offset the resulting month by 1.

EDATE

Another good use of TODAY is within the EDATE function. This is similar to the previous function, but it gives you a date that is a specified number of months before or after a date.

=EDATE(TODAY(),-11) 

The example above tells the function to return the date 11 months prior to today.

Working days

The last function we will cover is NETWORKDAYS which gives you the net number of working days between two dates.

=NETWORKDAYS(TODAY(), TODAY() + 31)

The dates in the example are generated using the TODAY function – today’s date, and the date 31 days from today.

The function tells me that there are 22 workdays (i.e. weekdays, with no weekends) between the two dates. This can be very useful for business planning purposes where weekends are generally not counted.

TODAY function vs. NOW function

The TODAY function is great if you want to generate today’s date. But what if your spreadsheet also needs to include the time?

Puede get the current date and time in Google Sheets with the NOW function.

TODAY function in Google Sheets 3

This function lets you generate the current date and time, right to the second. The NOW function can be used as a more precise substitute for the TODAY function in all of the examples shown above.

39 Automatice las transferencias de datos más allá de Importrange Descubra cómo

TODAY function: Key tips

The TODAY function can be very handy when you use Google Sheets to store time-critical information.

As already mentioned, if the TODAY function displays 24-Oct-2020 now and you open the file one day from now, the function will show 25-Oct-2020.

Although this is the intended functionality of TODAY, there are two problems with this behavior:

  1. You don’t want a “running” date: If you want to insert the current date in a cell but don’t want it to change, there is a shortcut for that, just press Ctrl + ; (semicolon) [Command + ; (semicolon) for Mac]. If this doesn’t work, it’s probably your keyboard configuration, hold down Ctrl and then button mash until you find it.
  2. Poor Google Sheets performance: Multiple TODAY functions within a spreadsheet may cause performance issues. Since this function is time-sensitive, Google Sheets recalculates the TODAY function very frequently and this results in an increased load.

Looking for more help using dates in Google Sheets?

Check out our other spreadsheet tutorials below or read how to use the Función AÑO or how to calculate differences between dates en Google Sheets.

Nota del editor: Esta es una versión revisada de un post anterior que se ha actualizado para mayor precisión y exhaustividad.

También te puede gustar...

funciones y fórmulas de google sheets

Cómo hallar el tipo de interés nominal con Google Sheets

Sarah es una joven profesional que toma importantes decisiones financieras. Desde tarjetas de crédito a hipotecas, préstamos estudiantiles e inversiones...
funciones y fórmulas de google sheets

Extraer datos de Google Calendar en Google Sheets mediante Apps Script

Este post fue publicado originalmente en nuestro foro de la comunidad. Objetivo : Esta guía muestra cómo utilizar Google Apps Script para extraer datos...
funciones y fórmulas de google sheets

Uso de la función PROPER para escribir en mayúsculas la primera letra de cada palabra en Google Sheets

Nota: Este artículo se publicó originalmente en el foro de nuestra comunidad. Alguna vez te has visto en la necesidad de limpiar una lista de nombres, títulos o cualquier...