Current Date

Hi All,

I am trying to undertake what I would expect to be a very simple task but I can find no way of doing it.

All I want to do is to be able generate the current date in a workflow, more particularly, the current year.

This is so I can then use the "current year" as a variable in a Row Filter node. At the moment I am having to manually enter the year, but I would like this year to change to 2012, once we go into the new year, so the user never has to change this.

 

Can this be done ?

Simon.

The simplest I can think of is using the "Java Edit Variable" (no input) with this expression:
      return Calendar.getInstance().get(Calendar.YEAR);
and return type Integer.

Regards,
  Bernd
 

Brilliant, that works perfect, just what I need!!

It would be great though if we could have a node which would do that in the future, as I'm quite allergic to Java/Python etc scripting :-)

 

Thanks

 

Simon.

Just the date?

I'll program that node for you, for just 50 bucks =D.

Joke, i'll may find some time the next weeks.

Aww, many thanks, It will be handy for setting up automated workflows for colleagues to use to be able to do this!

There is no rush as I can use the Java script WisWedel kindly offered me above, but for the future it will be handy not having to remember this script.

Simon.