Date

T

Tj Superfly

Hello All!

Hopefully you aren't all getting annoyed with my really stupid, yet easy
to answer questions.

Anyway, I'm in need of a way to use the current date and format it in
different ways, ways that I can use it within my program. The format is
as follows.

yyyymmdd

No spaces, example: 20071110 (todays date, Nov. 10, 2007)

:D Thanks in advance.
 
P

Piyush Ranjan

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

require "date"; Date.today.strftime("%Y%m%d")
 

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,792
Messages
2,569,639
Members
45,351
Latest member
RoxiePulli

Latest Threads

Top