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 442 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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors