You are viewing limited content. For full access, please sign in.

Question

Question

Adding YEAR to CSV Report Name - 2nd Issue

asked on August 10, 2017 Show version history

Created a Start Date Token and I use it in my search:

Also created a Year Token that I would like to use when I name my .csv file I'm writing to:

This published fine, but when I run the report, I get the following error (String was not recognized as a valid Date Time):

And it writes the file out, but without the Year at the end:

0 0

Answer

SELECTED ANSWER
replied on August 10, 2017

Your error message says the activity is Year Token. Not the Start Date token you use in your search (as circled in your shot).  If your issue is that it is not naming the csv with the year, what happens if you use a regular token instead of the date calculator?  You could create a string token pulling the current date and pull just the yyy format of it.  Since you are using it as a string in naming, would this work better than a date calculator token?

1 0

Replies

replied on August 10, 2017

The warning is correct. "2017" is not a valid date in your "Year token" Date Token Calculator activity at the top. So the token is not given a value.

If you just want to extract the year, then use Assign Token Values to create the token as %(date#"yyyy"#).

 

1 0
replied on August 10, 2017

THANK YOU!!! Yes, it worked when I made the Year Token a regular token rather than the date calculator. Appreciate the quick response!!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.