Community
    • Login

    How do I make a seconds to YY:DD:HH:MM:SS converter in Notepad++?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 263 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Oscar Söderström - TE3AO
      Oscar Söderström - TE3A
      last edited by

      I’ve made a seconds to YY:DD:HH:MM:SS converter in c++ before by using modulus(%). But it doesn’t work the same when I use it in Notepad. As an example, instead of giving me 1 year it says 1.234… How do I get rid of these numbers in the end?

      This is my current code:

      if(isset($_POST[‘skickat’]))
      {
      $hour = ($_POST[‘sek’]/3600);
      $min = (($_POST[‘sek’]%3600)/60);
      $sec = ($_POST[‘sek’]%60);
      echo $hour.“<br>”.$min.“<br>”.$sec;
      }

      ?>

      <form method=post>

      <input type=number name=‘sek’>
      <p>
      <input type=submit name=skickat>

      </form>

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Oscar Söderström - TE3A
        last edited by

        @Oscar-Söderström-TE3A

        I think you’ll want to CLICK HERE.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors