timestamp

S

Sunny Bogawat

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.
 
A

Axel Etzold

Dear Sunny,
-------- Original-Nachricht --------
Datum: Wed, 7 May 2008 18:09:03 +0900
Von: Sunny Bogawat <[email protected]>
An: (e-mail address removed)
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top