How To Subtract Minutes and Days From an Oracle Timestamp

The following SQL will subtract 15 minutes from an Oracle Timestamp, and 20 hours from a timestamp.

--15 Minutes Ago
select systimestamp, 
          cast(to_char(sysdate - (15/(24*60)),'dd-mon-yyyy hh:mi:ss') as timestamp) 
from dual;

--Yesterday 20 hours ago
select systimestamp, 
          cast(to_char(sysdate - (1200/(24*60)),'dd-mon-yyyy hh:mi:ss') as timestamp) 
from dual;

SQL Server Functions - Get First and Last Day in a Month

CREATE FUNCTION [dbo].[f_get_first_date_of_month] 
(
    @Date DATETIME
)
RETURNS DATETIME
AS
BEGIN

   return DATEADD(d, 0, DATEADD(m, DATEDIFF(m, 0, @Date), 0))
END
CREATE FUNCTION [dbo].[f_get_last_date_of_month] 
(
    @Date DATETIME
)
RETURNS DATETIME
AS
BEGIN

    RETURN DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, @Date) + 1, 0))

END

Disable Browser Back Button

Push the history forward in the page you want to stop the user from going back to the previous page. 

  $(function() {
      window.history.forward();
  });