Skip to main content
Nintex Community Menu Bar
Question

Error message: getFullYear() is not a function". What is the correct function to get year from date"

  • July 10, 2024
  • 1 reply
  • 949 views

Forum|alt.badge.img+7

I set this var

var InstallYear=InstallDate.getFullYear(); 

and I get this error

getFullYear() is not a function

what is the correct function to get the year from a date/time field?

1 reply

Forum|alt.badge.img+17
  • Nintex Employee
  • July 10, 2024

Do you need to do this in Javascript?

You could create UI Only field and use the “Year” function.

If you need to hang out in Javascript - you will probably need to convert the SF date to a JS date. Look for the skuid utility API: parseSFDate( sfDate )