Daily Archives: April 1, 2011

nant timestamp

i needed a datretime to backup my deployed applications. the goal was to store the backup in a datetime named folder, so its easy to find the last backup.

tryed it with datetime::now() and other datetime functions, but wasnt really satisfied and acutally the nant code was kinda unreadable… so googled it… and tstamp is the solution

 <tstamp property=”backup.datetime” pattern=”yyyyMMdd_HHmmss” />

creates the wished for property… well done 🙂