Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. General Discussion
  3. Inline date script 4 u 2 use freely

Inline date script 4 u 2 use freely

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 920 Views 2 Watching
  • 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.
  • JaecadeJnightJ Offline
    JaecadeJnightJ Offline
    JaecadeJnight
    Mod Helper
    wrote on last edited by
    #1

    43e1fc71-0a7e-43ef-abd4-99856c1f918d-image.png

    This gives today’s date, in a format suitable for databases. For today this returned “02/24/2025”.

    I’ll break it up into parts:

    1. Start with 2 join blocks, and put (current [year v]) at the far end.
      blocks (2).png
    2. Then, in those two spaces that say “apple”, you’ll place ternary operators (the if else blocks but as reporter blocks) that check for both the month and day of month, if they’re just one number, then to put a 0 before them since you can’t just have “1” in the date, instead “01”, and if they’re already something like “23” then there’s no need to add a 0 before it as “023” is not a day of the month or a month. There is also a workaround that I use that may confuse you, which is me adding “/” in odd spots in a way you usually wouldn’t use when making a date. That’s because the editor would mess up the 0 because when 02 = 2, and make what I was doing with the 0s useless.
    3. Now I’ll get into it, as Linus Torvalds said, “Talk is cheap. Show me the code.”
      In the first “apple”, put this:
      742e5626-cb12-47ef-aee3-a41d866fd1a4-image.png
      This is for the month, since the month goes first in this date format. It makes sure to add “/” after it to follow the date format (mm/dd/yyyy), and to cirumvent being turned into a number and instead turn into a string (so 02 doesnt become 2).
    4. In the second “apple”, put this:
      00284327-a919-4018-bd3b-d7f8c4cef424-image.png
      This gives the day of the month, known as the date in this context (a bit confusing, since there’s two date related things called date lol). It does the same thing done for the month so that it gets 0 if needed and has “/” at the end.
    5. Now you’re done! You don’t need to do that with the year since the year is always going to be 4 digits for a while.

    This is an example of where you would need this in a database:
    59d48fc6-2ba8-4852-8f4c-9a4edff2c19d-image.png
    If you need help with it working don’t be afraid to ask questions

    #LLJW
    <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

    TheNicknameGovT 1 Reply Last reply
    0
    • JaecadeJnightJ JaecadeJnight

      43e1fc71-0a7e-43ef-abd4-99856c1f918d-image.png

      This gives today’s date, in a format suitable for databases. For today this returned “02/24/2025”.

      I’ll break it up into parts:

      1. Start with 2 join blocks, and put (current [year v]) at the far end.
        blocks (2).png
      2. Then, in those two spaces that say “apple”, you’ll place ternary operators (the if else blocks but as reporter blocks) that check for both the month and day of month, if they’re just one number, then to put a 0 before them since you can’t just have “1” in the date, instead “01”, and if they’re already something like “23” then there’s no need to add a 0 before it as “023” is not a day of the month or a month. There is also a workaround that I use that may confuse you, which is me adding “/” in odd spots in a way you usually wouldn’t use when making a date. That’s because the editor would mess up the 0 because when 02 = 2, and make what I was doing with the 0s useless.
      3. Now I’ll get into it, as Linus Torvalds said, “Talk is cheap. Show me the code.”
        In the first “apple”, put this:
        742e5626-cb12-47ef-aee3-a41d866fd1a4-image.png
        This is for the month, since the month goes first in this date format. It makes sure to add “/” after it to follow the date format (mm/dd/yyyy), and to cirumvent being turned into a number and instead turn into a string (so 02 doesnt become 2).
      4. In the second “apple”, put this:
        00284327-a919-4018-bd3b-d7f8c4cef424-image.png
        This gives the day of the month, known as the date in this context (a bit confusing, since there’s two date related things called date lol). It does the same thing done for the month so that it gets 0 if needed and has “/” at the end.
      5. Now you’re done! You don’t need to do that with the year since the year is always going to be 4 digits for a while.

      This is an example of where you would need this in a database:
      59d48fc6-2ba8-4852-8f4c-9a4edff2c19d-image.png
      If you need help with it working don’t be afraid to ask questions

      TheNicknameGovT Offline
      TheNicknameGovT Offline
      TheNicknameGov
      trusted helpers
      wrote on last edited by
      #2

      @jeffreyrb03-gmail Shouldn’t this be under tutorials?

      Please help all my projects are 3000+ blocks

      JaecadeJnightJ silvloveS 2 Replies Last reply
      1
      • TheNicknameGovT TheNicknameGov

        @jeffreyrb03-gmail Shouldn’t this be under tutorials?

        JaecadeJnightJ Offline
        JaecadeJnightJ Offline
        JaecadeJnight
        Mod Helper
        wrote on last edited by
        #3

        @011830-0a42ef84 I dont have permissions to post there

        #LLJW
        <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

        1 Reply Last reply
        0
        • TheNicknameGovT TheNicknameGov

          @jeffreyrb03-gmail Shouldn’t this be under tutorials?

          silvloveS Offline
          silvloveS Offline
          silvlove
          Mod Helper
          wrote on last edited by
          #4

          @011830-0a42ef84
          You’re kind of right.
          Yes, it should, only 1 problem.
          You can’t

          Forums Moderator.
          Trans girl :3 ~ 14yo
          Friendly and sometimes goofy~!

          1 Reply Last reply
          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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • CreatiCode