• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

quick question about TStamp in ant

 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know that time and date properties can be set using <tstamp/>, but how do you output or echo this value? For example, as a variable in a message or log statement
[ September 22, 2006: Message edited by: kwame Iwegbue ]
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you tried? What isn't working or what kind of output are you getting?

It is setting properties that you can use like any other property.
 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


but <tstamp/> not supported in <echo>

I've looked in the Ant manual, but I couldn't see any reference to outputing time.
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kwame,

<project default="decko" name="bar-bar-decko" basedir=".">
<tstamp>
<format property="touch.time" pattern="MM_dd_yyyy_hh_mm_aa"/>
</tstamp>
<target name="decko">
<echo>Twas brillig, and the slithy toves</echo>
<echo>touch.time=${touch.time}</echo>
</target>
</project>

you can set the pattern.

HTH
 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Prateek!!!
It works. I really should get a good book on Ant...even though the online manual is quite good.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic