substring only the year or month from current date
how do you substring only the year or month from current date
Discussion (2)0
Comments
USER>Write $Piece($ZDate($Horolog,9)," ")
January
USER>Write $Piece($ZDate($Horolog,3),"-")
2018
You can use DATEPART function:
w $SYSTEM.SQL.DATEPART("year", $h)
>2018
w $SYSTEM.SQL.DATEPART("month", $h)
>1The advantage of this approach is more readable code.