Page 2 of 2

Posted: Mon Jun 21, 2010 12:36 pm
by Sairam
Week Starting as Sunday and ending as Saturday

Oconv((Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD") ) - (Mod( Oconv(Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD"),"dw"),7) + 7) , "D-YMD[4,2,2]")

The above expression will provide the Previous Week Sunday
in YYYY-MM-DD format

Previous Week Saturday
Oconv((Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD") ) - (Mod( Oconv(Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD"),"dw"),7) + 7) + 6 , "D-YMD[4,2,2]")

The above expression will provide the Previous Week Saturday
in YYYY-MM-DD format

Use in the Transform function or as Activity Variable in the Sequencer .

Posted: Mon Jun 21, 2010 2:05 pm
by Sairam
Get the Week Starting with Sunday

Oconv((Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD") ) - (Mod( Oconv(Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD"),"dw"),7) ) , "D-YMD[4,2,2]")

The above expression will provide the Week Starting with Sunday in YYYY-MM-DD format


Oconv((Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD") ) - (Mod( Oconv(Iconv(Oconv(date(), "D-YMD[4,2,2]") , "DYMD"),"dw"),7) ) + 6 , "D-YMD[4,2,2]")


The above expression will provide the Week Ending with Saturday in YYYY-MM-DD format


Thanks