Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How do you remember the number of days in each month?

by erix (Parson)
on Sep 16, 2014 at 15:26 UTC ( #1100788=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    select 
      to_char(
    ...
     30
     31
    (12 rows)
    
  2. or download this
    select to_char(generate_series('20140201','20150101',interval'1mon')-i
    +nterval'1','DD');
    
  3. or download this
    select to_char(generate_series('140201','150101',interval'1mon')-inter
    +val'1','DD');  -- Pg (9.5dev)
    SELECT TO_CHAR(ADD_MONTHS(DATE'14-1-1',LEVEL)-1,'DD')FROM Dual CONNECT
    + BY LEVEL<13;  -- Oracle (10g)
    ...
    
    select 30+(3+(3*m+3)%5-(3*m+1)%5)/5from generate_series(3,13)f(m);  --
    + wrog's (short but incomplete: march through january)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1100788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2020-11-29 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?