Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #46: Formatting a Date from an Integer

danbostrom
Astéroïde

 

 

celinednguyen
Météore

Please see attached!

 

 

chloeanggg
Atome

Here is my solution.

Justin_Bell
Météore

Well, I got to go down a fun RegEx Rabbit Hole for this one. To be fair I never actually converted into DateTime format, but then again the challenge said we were working with an integer that was a word, so I worked with a word.

 

I used RegEx to define all 7 characters of the string in 4 groups - the decade ID/year/mm/dd, then replace the decade ID $1 with 19 or 20, and then format the rest at the same time with dashes to just do it all in one tool. Formula runs .3ms (6.8% of the total runtime)


Enjoy

Challenge 46 BellSolution.JPG

jpg34
Astéroïde
Révélation
Révélation
Screenshot 2024-02-28 204123.png

DhritiBhakat
Météore

Done!

msobyjr
Météoroïde

solution

meesz
Météoroïde

They better recognize

ystossel1
Atome

Useful to know

Attached