Skip to main content

Necesito ayuda

  • January 28, 2025
  • 1 reply
  • 7 views

Forum|alt.badge.img+4
DATETIME_DIFF(
  TODAY(),
  {Fecha de nacimiento},
  "years"
) 
" aƱos, " 
(DATETIME_DIFF(
    TODAY(),
    {Fecha de nacimiento},
    "months"
  ) - 
  DATETIME_DIFF(
    TODAY(),
    {Fecha de nacimiento},
    "years"
  ) * 12
)
" meses"
 
 
 
como hago para que en vez de contar hasta hoy, se cuente hasta una fecha exacta?

1 reply

ibayub
Forum|alt.badge.img+10
  • Participating Frequently
  • January 28, 2025

Simplemente reemplace TODAY() con la fecha deseada usando DATE_TIME_PARSE para las 3 instancias de TODAY(), (Google Translate 🙂

Just replace Today () with the desired date using DATE_TIME_PARSE for all 3 instances of TODAY(), e.g. 

DATETIME_DIFF(
DATETIME_PARSE("2025-01-28"), // Replace with your target date
{Fecha de nacimiento},
"years"
)

etc.