Day of week -1
Day of week -1
Thanks,
- monahanks
- Posts: 17
- Joined: Wed Mar 30, 2011 9:19 am
Re: Day of week -1
Using the date manipulation tab, entering "-1" into the Day of Month value will return the previous day's day name.
- monahanks
- Posts: 17
- Joined: Wed Mar 30, 2011 9:19 am
Re: Day of week -1
Select DayName( Current_Date - 1 Day), Current_Date - 1 Day from SysIBM.SysDummy1
Note: This assumes that you're using an iSeries. SysDummy1 can be replaced by any SQL Table that has at least 1 record in that table.
There is a post on the Forum that eluded to a Utility Project called SQL Help. This utility allowed you to pass any valid SQL Select statement and get a returned value. You can see the Project in this post:
http://www.goanywheremft.com/forum/post418.html?sid=7b2c13876dad8283cef330a8b95471cc&sid=7b2c13876dad8283cef330a8b95471cc#p418
This would allow you to do something like:
- Code: Select all
<callProject label="SQL Help" version="1.0" project="/Utilities/SQL Help" runInSameJob="true" inheritUserVariables="true" returnUserVariables="true" onError="setVariable:Error=1">
<variable name="SQLStmt" value="( Current_Date - 1 Day )" />
<variable name="Reply" value=" " />
</callProject>
<setVariable label="Set Yesterday" version="1.0" name="Yesterday" value="${Reply}"/>
<callProject label="SQL Help" version="1.0" project="/Utilities/SQL Help" runInSameJob="true" inheritUserVariables="true" returnUserVariables="true" onError="setVariable:Error=1">
<variable name="SQLStmt" value="( DayName( Current_Date - 1 Day ) )" />
<variable name="Reply" value=" " />
</callProject>
<setVariable label="Set DayName" version="1.0" name="DayName" value="${Reply}"/>
<print label="Status" version="1.0">
<![CDATA[
*===========================================================================================*
Yesterday was ${ DayName } - ${ Yesterday }
*===========================================================================================*
]]>
</print>
Sr. Product Specialist
(402) 944.4242 x754
- Support_Rick
- Support Specialist
- Posts: 33
- Joined: Tue Jul 17, 2012 1:12 pm
Who is online
Users browsing this forum: No registered users and 1 guest