# Day night cycle with solar time through sunsky

**URL:** <https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318>\
**Category:** UI\
**Tags:** unreal-engine, Widget, UE4, Blueprint, question\
**Created:** [July 15, 2022, 5:56am UTC](https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318 "2022-07-15T05:56:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartik.marathe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kartik.marathe](https://forums.unrealengine.com/u/kartik.marathe)\
**Post date:** [July 15, 2022, 5:56am UTC](https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318/1 "2022-07-15T05:56:20Z")

</div>

Hi there,  
I have created a day-night cycle using Sunsky Actor, it is coordinated with solar time but I facing a problem with showing the time in the text with a widget slider. So please explain to me how I correctly bind the solar time to text in the slider.

---

<div class="post-metadata">

**Author:** ![Quetzalcodename](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quetzalcodename](https://forums.unrealengine.com/u/Quetzalcodename)\
**Post date:** [July 15, 2022, 10:16am UTC](https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318/2 "2022-07-15T10:16:40Z")

</div>

Hi @kartik.marathe!

Luckily enough, Unreal has a great tutorial showing exactly how to do just that. Here is the link:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/f/93fff6db8ebbd0a802f0bfcee9784c82f332e7d8.jpeg "Sun Position Driven by UI | Tips & Tricks | Unreal Engine") ](https://www.youtube.com/watch?v=_Sdm_gsbaos)

I hope the above solution works for you!

---

<div class="post-metadata">

**Author:** ![kartik.marathe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kartik.marathe](https://forums.unrealengine.com/u/kartik.marathe)\
**Post date:** [July 18, 2022, 4:47am UTC](https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318/3 "2022-07-18T04:47:22Z")

</div>

Yes, I’m aware of that video, but in this video, they haven’t shown how to blind (connect) with the slider’s text (solar time), making the slider show the day-night cycle time.

---

<div class="post-metadata">

**Author:** ![Quetzalcodename](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quetzalcodename](https://forums.unrealengine.com/u/Quetzalcodename)\
**Post date:** [July 18, 2022, 9:43am UTC](https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318/4 "2022-07-18T09:43:57Z")

</div>

Hey @kartik.marathe!

So you are just trying to dynamically update the text for the slider? If that is the case, you would just need to get your time assign the value to a string variable. After that you would go into your text context and bind your text to your string. Here is an example using just the hours:

 ![UE4Editor_4izoTsxvuh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/1/6d1e5c2046307d440f043d2fb39dc96204e23f49.png)

 ![UE4Editor_F4ZwFyYcB2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/5/6f523fa234873e7df3c9608195219d4011cb53cc.png)

![UE4Editor_AdMw3Yaoku](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/a/ceae272d7bf44930a41b5a3dbff0a6af22a98060.gif)

I hope the above solution works for you!

---

<div class="post-metadata">

**Author:** ![kartik.marathe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kartik.marathe](https://forums.unrealengine.com/u/kartik.marathe)\
**Post date:** [July 21, 2022, 9:24am UTC](https://forums.unrealengine.com/t/day-night-cycle-with-solar-time-through-sunsky/605318/5 "2022-07-21T09:24:28Z")

</div>

Thanks its work 👍
