Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by erix (Prior)
on Sep 16, 2014 at 15:26 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1100788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found