Wednesday, 27 February 2019

How to prevent browser back button with alert to user. ?

<script type="text/javascript">
          history.pushState(null, null, document.URL);
          window.addEventListener('popstate', function () {
              alert("Please proceed with Main button");
              history.pushState(null, null, document.URL);

          });

Wednesday, 30 January 2019

Difference between two timestamps in SQL to get as hh24:mi:ss and As mi.sec



to_char(to_date('1970-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')+(column1.END_DATE_TIME-column2.START_DATE_TIME),'hh24:mi:ss') as TotalTimeTaken

  round(       
    (cast(EeMntrTxnHeaderEO.END_DATE_TIME as date) - cast(EeMntrTxnHeaderEO.START_DATE_TIME as date))       
    * 24 * 60      
  ,2) as TotalTimeTaken