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 #87: Losing Daylight

DemandEngineer
8 - Asteroid

Hi All,

 

While I was able to get this to work... it seems odd to have to do math by converting the time to a number and then applying math (+12 hours) and then converting back and concatinating...

 

I initially tried this but it didn't work... it only outputted Null... don't understand why...

 

DateTimeAdd([Sunset_Out], 12, "hours")

 

Can someone help me understand why? Does this function only work on Date and Time and not Time only?  I also posted the question here:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/DateTimeAdd-used-in-formula-causes-tim...

cmv
7 - Meteor
Spoiler
I was going down that route at first but then realized that it was better to use the original data that gives you the field as AM/PM and use that when converting to DateTime, then you don't have to worry about it. 

I used a MultiField formula with this expression: DateTimeParse(Left([_CurrentField_], 7), '%I:%M %p'). Then you can just use DateTimeDiff([New_Sunset],[New_Sunrise],"minutes")
brig
8 - Asteroid
Spoiler
image.png

Here's my updated solution, didn't like the previous, it was too messy. Much easier with 1 Datetimeparse formula. 

CKP
10 - Fireball

My solution

 

Spoiler
challenge_87_mysolution.jpg
EdE
7 - Meteor

My solution.

Spoiler
Temp.gif
Harkamal
8 - Asteroid

Here is the solution..I took help from the attached solution..

mike_w
8 - Asteroid

my approach 

Spoiler
mike_w_0-1593714613423.png

 

AkshayB
7 - Meteor

Solution Challenge 87

RNG
8 - Asteroid

.

JP_SDAK
8 - Asteroid

Here's my solution.