Geeks With Blogs

News

Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done

select to_char( date '2008-01-04', 'IW' ) from dual

Basically, there are 3 to_char format models to get week number:

* W - week number in a month

* WW - week number in a year, week 1 starts at 1st of Jan

* IW - week number in a year, according to ISO standard -

alternative: ROUND(TO_NUMBER(TO_CHAR(datefield,'ddd'))/7)

Related Posts on Geeks With Blogs Matching Categories

Comments on this post: Oracle Week Numbers

# re: Oracle Week Numbers
I think I am not good enough for this soft. I can not understand it.Formal Gowns
Left by G on Mar 29, 2010 12:27 AM

# re: Oracle Week Numbers
Very good work! I always like to leave comments whenever I see something unusual or impressive. I think we must appreciate those who do something especial. Keep it up, thank
Left by pdf books on Apr 30, 2010 11:42 AM

# re: Oracle Week Numbers
Working late in the night to complete project. Well if excessive work has left your feeling hungry then you can order food online. To order food delivery online in San Francisco visit San Francisco food delivery

Left by James on May 29, 2010 4:54 AM

# re: Oracle Week Numbers
I like this, thanks you very much.
Left by geo news on Jul 09, 2010 1:01 PM

# re: Oracle Week Numbers
What Happen for cross the calendar year? there is generally not right for having week number 53 or value 0.

Example 1 using 1st Jan 2010
Using ROUND(TO_NUMBER(TO_CHAR(to_date('20100101','YYYYMMDD'),'ddd'))/7) return 0

Example 2 using 1st Jan 2010
SELECT TO_CHAR(TO_DATE('20100101','YYYYMMDD') ,'yyyy,iw'), TO_CHAR(TO_DATE('20100101','YYYYMMDD') ,'yyyy,ww') FROM dual
==> return 2010,53 and 2010,01

Example 3 using 31st Dec 2009
SELECT TO_CHAR(TO_DATE('20091231','YYYYMMDD') ,'yyyy,iw'), TO_CHAR(TO_DATE('20091231','YYYYMMDD') ,'yyyy,ww') FROM dual
==> return 2009,53 and 2009,53

I personally use IW, but i have trouble of getting the 2009,53 for 1st Jan 2010.....

Thoughts? Thanks.
Left by oracle_dummies on Sep 15, 2010 12:09 AM

# re: Oracle Week Numbers
Andrew O
Useful little class ... barbie oyunları thanks
Left by giysi giydirme oyunları on Nov 24, 2010 8:05 PM

# re: Oracle Week Numbers
I love how you guys always change the mysterious voodoo into common sense tests. Thanks SEOMoz for letting CRE tell your story so we could learn how to think like human beings instead of bots.
Left by michael jordan air shoes on Dec 18, 2010 1:10 AM

# re: Oracle Week Numbers
nike jobs
retro jordan 5
nike jordan shorts
nike jordan shoes
retro jordan 6
nike jordan shorts
Left by nike air jordan shoes release da on Jan 08, 2011 1:49 AM

# re: Oracle Week Numbers
acheter tabouret de bar pas cher
Left by tabouret de bar on Feb 02, 2011 2:03 AM

# re: Oracle Week Numbers
I have been looking for how to display a week number in a month for a good while. This is just what I was looking for. Thanks for posting this brief, but useful tip. I really appreciate it.
Left by Travel Insurance on Feb 02, 2011 5:03 PM

# re: Oracle Week Numbers
Left by TerrenceFrancis on May 19, 2011 11:31 PM

# re: Oracle Week Numbers
wow. Hadn’t know that before - quite an impact.
pizza tacoma | tacoma pizza
Left by michaeljack on May 20, 2011 2:28 AM

# re: Oracle Week Numbers
online fitness trainers
Left by jeffclark on May 20, 2011 2:31 AM

# re: Oracle Week Numbers
That thread was exactly a splendid example.web design arlington|fort worth search engine optimization
Left by ElterJohn on May 31, 2011 10:36 PM

# re: Oracle Week Numbers
<a href="http://www.foxypropaganda.com/offset-printing/" title="offset printing" style="text-decoration:none; color:#000000; rel="dofollow">offset printing | <a href="http://www.foxypropaganda.com/" title="fast printing ft worth" style="text-decoration:none; color:#000000; rel="dofollow">fast printing ft worth
Left by simonatkins on Jun 03, 2011 1:04 AM

# re: Oracle Week Numbers
That's brief but for others,those codes are intricate. Whitetail Deer Hunting in Texas
Left by TobyLee on Jun 27, 2011 10:43 PM

# re: Oracle Week Numbers
ISO really is an asset.
Left by janemoore on Jul 03, 2011 10:50 PM

# re: Oracle Week Numbers
That is such an impressive thing to learn.mayweather vs ortiz tickets|pacquiao vs marquez
Left by jacksonsmith on Jul 03, 2011 10:52 PM

# re: Oracle Week Numbers
Nice work simple but unique...
Left by marquez vs pacquiao on Jul 03, 2011 11:22 PM

# Wholesale Air Retro Jordan
The German fiscal system is displaying mixed indicators of slowdown since the region’s cost card debt turmoil worsens and increasing vitality fees squeeze home incomes.
Left by jordans shoes on Jul 07, 2011 4:11 AM

# re: Oracle Week Numbers
That was great.axis hunting|hunting elk
Left by TobyLee on Jul 20, 2011 10:12 PM

# re: Oracle Week Numbers
I think we must appreciate those who do something especial. Keep it up, thank.pacquiao vs marquez|pacquiao vs marquez live streaming
Left by justinbrown on Jul 27, 2011 3:29 AM

# re: Oracle Week Numbers
that was great! Nicklaus Misiti | Nicklaus Misiti
Left by KennethColeman on Jul 27, 2011 3:31 AM

# re: Oracle Week Numbers
awesome! very unique. you got a wise idea. Nicklaus Misiti | Nicklaus Misiti
Left by KennethColeman on Jul 27, 2011 3:32 AM

# re: Oracle Week Numbers
Amazing quite an impact. Nicklaus Misiti | Nicklaus Misiti
Left by Nick on Jul 27, 2011 3:34 AM

# re: Oracle Week Numbers
Remarkable information for everyone. Thanks.
Left by invertalign inversion table on Aug 29, 2011 12:51 AM

# re: Oracle Week Numbers
Left by myrnafox on Sep 13, 2011 10:07 PM

# re: Oracle Week Numbers

Great article, I have been a big fan of SEOmoz for awhile and their dedication to customers and their experience is top-notch.
Left by Cheap Bridal Gown on Sep 16, 2011 3:11 AM

# re: Oracle Week Numbers
What a great post, was really interesting.
Left by canvas art on Sep 22, 2011 11:01 AM

# re: Oracle Week Numbers
Boffo! You've got a wise idea. Thanks for sharing this.
tanning salon federal way | desert sun federal way
Left by BrianStephen on Sep 26, 2011 2:43 AM

# re: Oracle Week Numbers
Pacquiao vs Marquez | Cotto vs Margarito
Left by Williams on Sep 26, 2011 2:45 AM

# re: Oracle Week Numbers
You've done a great job here used inversion tables | ep 550 inversion table
Left by ronchester on Oct 03, 2011 2:39 AM

# re: Oracle Week Numbers
more on Oracle is to watch Vampire Diaries Season 3 Episode 5 Online and then share it for a later discussion on MEGAVIDEO
Left by Watch The Vampire diaries on Oct 08, 2011 8:40 AM

# re: Oracle Week Numbers
I just came across your blog and reading your beautiful words. I thought I would leave my first comment but I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Left by management on Oct 11, 2011 2:07 PM

# The Walking Dead Season 2 Episode 4
I like this oracle number I use to win at CastleVille Hack on Facebook so now I can start to witness the fight of the year with Pacquiao vs Marquez 3 Online now that you already pin out what is the best with this blog this will be a new hope for us.
Left by Watch The Walking Dead Season 2 on Nov 06, 2011 6:16 AM

# re: Oracle Week Numbers
Thanks for the information you share about oracle.
Left by anniversary gifts on Nov 10, 2011 4:54 AM

# re: Oracle Week Numbers
Now I know. Glad you share that with us.
Left by welding training on Nov 10, 2011 4:57 AM

# re: Oracle Week Numbers
I'm thankful you tell us what you know about oracle week numbers.
Left by NCAA Final Four Tickets on Nov 10, 2011 4:58 AM

# re: Oracle Week Numbers
Left by jeorgecruise on Nov 18, 2011 4:57 AM

# re: Oracle Week Numbers
Great article, I have been a big fan of SEOmoz for awhile and their dedication to customers and their experience is top-notch.
New York Credit Union | Credit Union Credit Card
Left by Jonathan on Dec 21, 2011 4:54 PM

# re: Oracle Week Numbers
Good work! I always like to leave comments whenever I see something unusual or impressive. I think we must appreciate those who do something especial. Keep it up, thanks
Helen Olsson
Left by live cricket on Feb 08, 2012 12:48 PM

# re: Oracle Week Numbers
One of the very best boxers on the planet fights Juan Marquez for a fourth time, be sure to watch Pacquiao vs Marquez live and be there round by round.

Everyone will be watching because this may be the biggest fight of the year, so watch Pacquiao vs Marquez online if it isn't possible to see it on TV.
Left by Klitschko vs Wach on Nov 06, 2012 10:09 AM

# re: Oracle Week Numbers
Left by live tv on Nov 14, 2012 9:05 AM

# re: Oracle Week Numbers
The German fiscal system is displaying mixed indicators of slowdown since the region’s cost card debt turmoil worsens and increasing vitality fees squeeze home incomes.
Left by islamic channel on Nov 21, 2012 10:41 AM

# re: Oracle Week Numbers
5, Printer to print no words, what is the solution?
Print no word generally need to clean the print head. If there is still no word, ink has run out, you need to replace the ink cartridge. The general replacement cartridges need to be cleaned 1-2 times the print head to print properly. If still does not work after cleaning, to please the peripheral repair station identified with Canon contact.pg-510
Left by hp photosmart b110 ink on Jan 15, 2013 1:49 AM

# re: Oracle Week Numbers
I'm interested to know the basics of how to start a small business initially.
Your help is very much appreciated , thanks
air jordan
Left by Jordan Shoes on Feb 28, 2013 8:37 PM

# re: Oracle Week Numbers
I have been looking for how to display a week number in a month for a good while. This is just what I was looking for. Thanks for posting this brief, but useful tip.
Left by live news on Mar 18, 2013 9:55 AM