getTime function not working

getTime function not working

I'm using the 'getTime' function in a Creator app but when I save it I get the error "Not able to find getTime function". I'm trying to use it as a function instead of a method.

The latest documentation here states that I can use it as a function. As shown in the code snippet.

  1. <variable>=<dateTimeValue>.getTime([<format>], [<show_seconds>]);

    (OR)

    <variable>=getTime(<dateTimeValue>,[<format>],[<show_seconds>]);

Do you know why it might not be working?