# Date

**URL:** <https://www.ruby-forum.com/t/date/119831>\
**Category:** Ruby\
**Created:** [November 11, 2007, 3:48am UTC](https://www.ruby-forum.com/t/date/119831 "2007-11-11T03:48:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![superfly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@superfly](https://www.ruby-forum.com/u/superfly)\
**Post date:** [November 11, 2007, 3:48am UTC](https://www.ruby-forum.com/t/date/119831/1 "2007-11-11T03:48:36Z")

</div>

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)

😃 Thanks in advance.

---

<div class="post-metadata">

**Author:** ![superfly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@superfly](https://www.ruby-forum.com/u/superfly)\
**Post date:** [November 11, 2007, 4:09am UTC](https://www.ruby-forum.com/t/date/119831/2 "2007-11-11T04:09:41Z")

</div>

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