Saltar al contenido principal

¿Cómo calcular la duración del servicio desde la fecha de contratación en Excel?

Si tiene una variedad de datos que incluyen los nombres de los empleados y su fecha de incorporación a su empresa en una hoja de trabajo, ahora, es posible que desee calcular la duración de su servicio, es decir, cuántos años y meses ha trabajado un empleado para su empresa. En este artículo, hablaré sobre el método rápido para resolver este trabajo por usted.

Calcule la duración del servicio desde la fecha de contratación con la función YEARFRAC

Calcule la duración del servicio desde la fecha de contratación con la función DATEDIF

Calcule la duración del servicio desde la fecha de contratación hasta hoy con la función DATEDIF

Calcula la duración del servicio a partir de la fecha de contratación con una función sorprendente


Calcule la duración del servicio desde la fecha de contratación con la función YEARFRAC

Para calcular la duración del servicio desde la fecha de contratación y una fecha específica, la función YEARFRAC puede ayudarlo.

Ingrese o copie la siguiente fórmula en una celda en blanco:

=INT(YEARFRAC(B2,C2))

Note: En la fórmula anterior, B2 es la celda de fecha de contratación y C2 es la celda de fecha de finalización.

Luego arrastre el controlador de relleno para copiar la fromula a otras celdas que necesite, y obtendrá la duración de servicio de la persona en años.


Calcule la duración del servicio desde la fecha de contratación con la función DATEDIF

Si necesita calcular la duración del servicio en años, meses y días exactos, la función DATEDIF en Excel puede hacerle un favor.

Calcule la duración del servicio en años:

Ingrese o copie la siguiente fórmula en una celda en blanco:

=DATEDIF(B2, C2, "y")& " Years"


Calcule la duración del servicio en años y meses:

Aplica la siguiente fórmula:

=DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months"


Calcule la duración del servicio en años, meses y días:

Aplicar la siguiente fórmula:

=DATEDIF(B2,C2,"y") & " Years, " & DATEDIF(B2,C2,"ym") & " Months, " & DATEDIF(B2,C2,"md") & " Days"

Note: En la fórmula anterior, B2 es la celda de fecha de contratación y C2 es la celda de fecha de finalización.


Calcule la duración del servicio desde la fecha de contratación hasta hoy con la función DATEDIF

En algunos casos, es posible que desee calcular la duración del servicio desde la fecha de contratación hasta hoy, por lo que, cada día que abra la hoja de trabajo, la duración del servicio se actualizará automáticamente. En este caso, debe combinar la función HOY dentro de la función SIFECHA.

Aplique cualquiera de las fórmulas siguientes a sus necesidades:

=DATEDIF(B4, TODAY(), "y")& " Years"
= DATEDIF (B4, TODAY (), "y") & "Years", & DATEDIF (B4, TODAY (), "ym") & "Months"
= DATEDIF (B6, TODAY (), "y") & "Years", & DATEDIF (B4, TODAY (), "ym") & "Months", & DATEDIF (B4, TODAY (), "md") & " Dias"


Calcula la duración del servicio a partir de la fecha de contratación con una función sorprendente

Es algo difícil para usted recordar tantas fórmulas, pero, si tiene Kutools for Excel, Con su Asistente de fecha y hora característica, puede calcular rápidamente la duración del servicio en años, meses, días, años + meses + días u otros formatos que necesite.

Nota: Para aplicar esto Asistente de fecha y hora, en primer lugar, debe descargar el Kutools for Excely, a continuación, aplique la función de forma rápida y sencilla.

Después de instalar Kutools for Excel, haz lo siguiente:

1. Haga clic en la celda donde desea ubicar el resultado y luego haga clic en KutoolsAyudante de fórmula > Asistente de fecha y hora, ver captura de pantalla:

2. En la Asistente de fecha y hora cuadro de diálogo, realice las siguientes operaciones:

  • cheque Diferencias Opción de la Tipo de Propiedad sección;
  • En el Entrada de argumentos cuadros de texto, seleccione las celdas que contienen la fecha de contratación y la fecha de finalización por separado;
  • Luego, elija el tipo de resultado de salida que necesite. Por ejemplo, puede obtener la duración del servicio en años, meses, años + meses + días, años + meses, etc.

3. Después de terminar la configuración, haga clic en OK , y obtendrá el primer resultado calculado, luego, solo necesita arrastrar el controlador de relleno para completar esta fórmula para probar las celdas, y ahora obtendrá el siguiente resultado según lo necesite:

¡Haga clic para descargar Kutools para Excel y prueba gratuita ahora!


Artículos más relativos:

  • Cuente el número de días / días laborables / fines de semana entre dos fechas
  • ¿Alguna vez ha necesitado contar el número de días entre dos fechas en Excel? Es posible que, a veces, solo desee calcular los días hábiles entre dos fechas y, en algún momento, solo necesite contar los días de fin de semana entre las dos fechas. ¿Cómo podría contar el número de días entre dos fechas en una determinada condición?
  • Calcular días, horas y minutos entre dos fechas
  • Supongamos que tiene dos columnas de celdas de fecha y hora, y ahora, desea calcular la diferencia en días, horas y minutos entre estas dos celdas de fecha y hora como se muestra en la siguiente captura de pantalla. En este artículo, hablaré sobre algunos métodos para resolver esta tarea por usted.

Las mejores herramientas de productividad de oficina

🤖 Asistente de IA de Kutools: Revolucionar el análisis de datos basado en: Ejecución inteligente   |  Generar codigo  |  Crear fórmulas personalizadas  |  Analizar datos y generar gráficos  |  Invocar funciones de Kutools...
Características populares: Buscar, resaltar o identificar duplicados   |  Eliminar filas en blanco   |  Combine columnas o celdas sin perder datos   |   Ronda sin fórmula ...
Super búsqueda: Búsqueda virtual de criterios múltiples    Búsqueda V de valores múltiples  |   VLookup en varias hojas   |   Búsqueda difusa ....
Lista desplegable avanzada: Crear rápidamente una lista desplegable   |  Lista desplegable dependiente   |  Lista desplegable de selección múltiple ....
Administrador de columnas: Agregar un número específico de columnas  |  Mover columnas  |  Toggle Estado de visibilidad de columnas ocultas  |  Comparar rangos y columnas ...
Características destacadas: Enfoque de cuadrícula   |  Vista de diseño   |   Gran barra de fórmulas    Administrador de hojas y libros de trabajo   |  Biblioteca de Recursos (Texto automático)   |  Selector de fechas   |  Combinar hojas de trabajo   |  Cifrar/descifrar celdas    Enviar correos electrónicos por lista   |  Súper filtro   |   Filtro especial (filtro negrita/cursiva/tachado...) ...
Los 15 mejores conjuntos de herramientas12 Texto Herramientas (Añadir texto, Quitar caracteres, ...)   |   50+ Tabla Tipos (Diagrama de Gantt, ...)   |   40+ Práctico Fórmulas (Calcular la edad según el cumpleaños, ...)   |   19 Inserción Herramientas (Insertar código QR, Insertar imagen desde la ruta, ...)   |   12 Conversión Herramientas (Números a palabras, Conversión de Moneda, ...)   |   7 Fusionar y dividir Herramientas (Filas combinadas avanzadas, Células partidas, ...)   |   ... y más

Mejore sus habilidades de Excel con Kutools for Excel y experimente la eficiencia como nunca antes. Kutools for Excel ofrece más de 300 funciones avanzadas para aumentar la productividad y ahorrar tiempo.  Haga clic aquí para obtener la función que más necesita...

Descripción


Office Tab lleva la interfaz con pestañas a Office y hace que su trabajo sea mucho más fácil

  • Habilite la edición y lectura con pestañas en Word, Excel, PowerPoint, Publisher, Access, Visio y Project.
  • Abra y cree varios documentos en nuevas pestañas de la misma ventana, en lugar de en nuevas ventanas.
  • ¡Aumenta su productividad en un 50% y reduce cientos de clics del mouse todos los días!
Comments (20)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
First, thank you very much for helping us!

I am trying to use the formula for years and months of service (=DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months") which works great, but I would like to add that line and another line that just has numbers in it. Is that possible? For instance: The formula =DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months" is located in D2 and I would like to add number of years and months of service from another agency in E2 with the total sum in F2.

All assistance is great appreciated.
Rated 5 out of 5
This comment was minimized by the moderator on the site
If I have a mixed list of employees still with the company (with start date only) and employees no longer with the company (with start and end date), is there a formula for calculating length of service using current date unless there is an end date, in which case the end date would be used in place of the current date to calculate total length of service from start to end?
This comment was minimized by the moderator on the site
what version of Excel can i get this? I am unable to get the function on Excel 2016
This comment was minimized by the moderator on the site
Hello,
The Excel version in the example is Excel 2010. The DATEDIF function is not available in Excel 2013 and later versions.
DATEDIF is not a standard function and hence not part of functions library and so no documentation. Microsoft doesn't promote to use this function as it gives incorrect results in few circumstances.

This function does not appear in the 'Insert Function' dialog box and is not recognised in the 'Function Arguments' dialog box.
The accuracy of this function was improved slightly in Excel 2010 but some of the bugs were never fixed.

Hope it helps. Have a nice day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
After the years of service has been determined. How do you calculate the persons service computation date (SCD). Is there a formula to subtract the years of service from the persons new appointment date to get their SCD leave date?
This comment was minimized by the moderator on the site
i m in problem; I am new joining to Govt. dept. as Junior Clerk in Accounts site: I want to calculate to make service end period, and after to add extra months years days in service period given by government relaxation period to complete service 9 to 10 years as (the total service is 8 year, 8 months, 18 days) but govt. give 10 months and 28 days to compile the service period for allowing the come in to as pensioner. Thanks to you for solve that problem.
This comment was minimized by the moderator on the site
Dear have a good health to you. I requesting for adjust more months days year in less service length 9 years to make complet 10 years. please tell about it.
This comment was minimized by the moderator on the site
How can I just highlight the cells if the yearly anniversary is within a week? For example They started on 01/10/2020 and I want the start date to be highlighted yellow if the date is 24/09 in each year and then turn red if the anniversary has passed, so turn red 7 days after the 1st?
This comment was minimized by the moderator on the site
Work Services Calculation 1 month different in formula
This comment was minimized by the moderator on the site
If service is 25 Year 07 Months 05 Days than i calculate no. of year and the result is 25, but need to calculate/consider full year if months is equal to 06 months or exceed. After calculation
This comment was minimized by the moderator on the site
For calculating the length of services in years, months and days with start date and end date, I noted that the result for James is 20 days. I would like to confirm if the end date means separation effective date (Day 1 after termination/separation) or last employment date.
Both start (hire date) and end date (last employment date "LED") should be inclusive in the calculation. It is expected to return 21 days but not 20 days as it counted no. of days from 12/11/2025 to 12/31/2025.
How to change the formula? Or should it be used termination effective date (LED + 1 day) as cell C2, instead of input "LED" as end date?
This comment was minimized by the moderator on the site
Florence, you are correct, and the tutorial above is simply wrong. When calculating years of service/length of service, the calculation must be inclusive of the last day worked. Using basic date subtraction formulas tell the *difference* between 2 dates (which will short the length of service by 1 day). For example, if someone stated the 1st, and ended the following day (2nd), taking the date difference would be 1 day (when they actually worked 2 days). Another example: If you use the method above for someone who started work on January 1st, and their last day was December 31st, it will not show that they've worked a complete year -- which is of course an error. The way to get the correct answer is to add +1 to the end date. So, everywhere you see C2 above should be C2+1. This is a significant problem where people everywhere are using this incorrect formula for calculating years of service. The formula is typically correct except the edge case of the last day of employment being the exact day before their start day. I'm in a dispute with my former employer over this very issue. Formulas like this should always be checked for edge cases like worked 1 day, 2 days, worked exactly 1 year, the anniversary date, day before/after, etc. When doing this, you will see all sorts of problems like the one you described.
This comment was minimized by the moderator on the site
Hi, Florence,If you want to include both the start date and end date when calculating, you just need add 1 after the days part as below formula:=DATEDIF(B2,C2,"y") & " Years, " & DATEDIF(B2,C2,"ym") & " Months, " & DATEDIF(B2,C2,"md")+1 & " Days"
Please try, hope it can help you!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations