extract month from current_date in postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vikas Jain
    New Member
    • Feb 2009
    • 6

    extract month from current_date in postgresql

    Hi,
    please tell me how to subtract month from current_date in postgresql.
    Thanks in advance.
    Vikas Jain
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by Vikas Jain
    Hi,
    please tell me how to subtract month from current_date in postgresql.
    Thanks in advance.
    Vikas Jain
    Do you have a java.sql.Date object? If so, its parent class (an ordinary java.util.Date) has a getMonth() method.

    kind regards,

    Jos

    Comment

    • Vikas Jain
      New Member
      • Feb 2009
      • 6

      #3
      Thanks Sir,i got the point.

      Comment

      Working...