Last Mon to Sun

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • umaramachandran
    New Member
    • Dec 2009
    • 1

    #1

    Last Mon to Sun

    I need to get last monday to Last sunday date range.

    For eg. In case today's date i s 12th Feb , 2010. Then I need to get the date range as

    1 st of Feb to 7th of Feb.

    I dont have any date table as such and have to use the dual/sysibm.sysdummy 1 table. Please help me out!
  • arjunsinghsamant
    New Member
    • Jan 2010
    • 3

    #2
    select ((current date-(dayofweek(curr ent date)-1)days)-6 days)as last_monday,
    (current date-(dayofweek(curr ent date)-1)days) last_sunday
    from sysibm.sysdummy 1

    Comment

    Working...