<aside> 🧙‍♂️ A little lesson on time in Notion and then the goods!

</aside>

<aside> 🧙‍♂️ We can use the Unix timestamp functionality built into Notion to generate random numbers. Check out the link below for more on Unix numbers. But first, let’s see this working with $\color{#4fb0ae}\small\textsf{Dates}$ for fun https://www.epochconverter.com/

</aside>

//Human-readable time 	milliseconds
1 second 1000 milliseconds
1 minute 60000 milliseconds
1 hour	3600000 milliseconds
1 day	86400000 seconds
1 week	604800000 seconds
1 month (30.44 days) 	2629743000 seconds
1 year (365.24 days) 	 31556926000 seconds

Adding to Dates

<aside> 🧙‍♂️ RNG = Random Number Generator. Use the Notion default option for page load limits to avoid unnecessary complexity with determining each record’s ranking.

</aside>

Dictionary


//determine persistent daily value based on today's timestmap by removing hours and seconds
dateBetween(fromTimestamp(0), now(), "milliseconds") * -1 - hour(now()) * 3.6e+6 - minute(now()) * 60000

//extract a subset of the randomly set numbers as part of each unique record's id
toNumber(slice(format(replaceAll(id(), "[a-z]", "")), 0, 6))

//combine to generate a unique randomly generated number by using the mod function, which divides two numbers and returns the remainder
mod(dateBetween(fromTimestamp(0), now(), "milliseconds") * -1 - hour(now()) * 3.6e+6 - minute(now()) * 60000, toNumber(slice(format(replaceAll(id(), "[a-z]", "")), 0, 6)))

<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d97c22d3-da8c-4595-8abd-a86335e08269/ID__N_Logo_(Light).png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d97c22d3-da8c-4595-8abd-a86335e08269/ID__N_Logo_(Light).png" width="40px" /> By AdamNotion Certified RedditNotion AnswersUpWorkTwitterNewsletter Feeling generous? ☕ Buying a coffee refill is greatly appreciated!

</aside>

$$ \footnotesize\textsf{© Involve Design Inc.} $$

By using our site, you accept our Privacy Policy. © 2024 Involve Design Inc.