setdateyear - script and chart function

This function takes as input a timestamp and a year and updates the timestamp with the year specified in input. 

Syntax:  

setdateyear (timestamp, year)

Return data type: dual

Arguments:  

Argument Description
timestamp The date to evaluate as a timestamp or expression resolving to a timestamp, to convert, for example '2012-10-12'.
year A four-digit year.