Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Rearranging a date in $Name using an agent
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1350662809

Message started by Mark Anderson on Oct 19th, 2012, 12:06pm

Title: Rearranging a date in $Name using an agent
Post by Mark Anderson on Oct 19th, 2012, 12:06pm

Building on this thread, what if you have titles starting DD/MM/YYYY and wanted then to start YYYY/MM/DD for easier sorting on $Name?

So,
"26/10/2012 Desperately tried to work out what to do"
becomes
"2012/10/26 Desperately tried to work out what to do"

An agent to the rescue! Try this.

Query:  $Name.contains("^(\d{2})/(\d{2})/(\d{4})(.*)")
Action:  $Name = $3+"/"+$2+"/"+$1+$4

Again, no note level rules involved. The agent is self emptying too, as once changed, the $Name no longer meets the query.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.