Timestamp

i want attaches a timestamps to file for this i doing Time.now_filename
but it gives error because time has a space sum it so i need some
another mechanism using which i generate timestamps and attached to
timestamps.

Dear Sunny,
-------- Original-Nachricht --------

Datum: Wed, 7 May 2008 18:09:03 +0900
Von: Sunny B. [email protected]
An: [email protected]
Betreff: timestamp

i want attaches a timestamps to file for this i doing Time.now_filename
but it gives error because time has a space sum it so i need some
another mechanism using which i generate timestamps and attached to
timestamps.

Posted via http://www.ruby-forum.com/.

maybe you attach Time.now.to_s.gsub(/ /,’_’) ?
There are also methods to extract the day, the hour or the second from a
Time object:

www.ruby-doc.org/core/classes/Time.html

Best regards,

Axel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs