Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Functions @year[date] @isowyear[date] help

Jul
441
6
Here is what I get when I use the functions @year[] & @isowyear[]

I am using TCMD V16, windows 7 ultimate sp1.

There are no Plugins loaded.

Copied and pasted from the TC help v.16.0

Code:
Thu  Jan 16, 2014  3:07:27 [6840]
C:\JPSoft\plugins>echo %@isowyear[%_date]
TCC: Invalid date "%@isowyear[01/16/14]"

Thu  Jan 16, 2014 10:31:03 [6840]
C:\JPSoft\plugins>echo %@year[5-5-2012,1]
TCC: (Sys) Incorrect function.
 "%@year[5-5-2012,1]"

Other attempts :

Code:
Thu  Jan 16, 2014  2:59:48 [6840]
C:\JPSoft\plugins>*echo %@YEAR[%_DATE]
TCC: (Sys) Incorrect function.
 "%@YEAR[01/16/14]"

Thu  Jan 16, 2014  2:59:52 [6840]
C:\JPSoft\plugins>echo %@year[5-5-2012]
TCC: (Sys) Incorrect function.
 "%@year[5-5-2012]"

The following seem to work so the help for @ISOWYEAR[date] just needs updating. Not tested but I suspect that the @ISODOWI[date] and @ISOWEEK[date] examples need updating.

Code:
Thu  Jan 16, 2014 10:31:28 [6840]
C:\JPSoft\plugins>echo %@isowyear[%_isodate]
2014

Thu  Jan 16, 2014 10:36:10 [6840]
C:\JPSoft\plugins>echo %_isodate
2014-01-16

Thu  Jan 16, 2014 10:36:13 [6840]
C:\JPSoft\plugins>echo %@isowyear[2014-01-22]
2014

The remaining questions is; What am I missing when trying to use the @year function?

rps
 
Under Regional Settings, what is your date setting format? Mine is yyyy-mm-dd and it reports errors for 5-5-2012 and 5/5/12.
 
Since v16 the following code stopped working.

Code:
echo %@year[%_date]

(Yes, I know there is a better way to get that year. That's not the point, is it?)
 
Under Regional Settings, what is your date setting format? Mine is yyyy-mm-dd and it reports errors for 5-5-2012 and 5/5/12.

SNAGHTML10d811d3.PNG


M/d/yyyy
 

Similar threads

Back
Top