How do I code to show sunrise time at night and sunset during day time?

Hi,

I'm slowly expanding my understanding of just how much you can do with this app. Wondered if it's possible to create a code so at night time I see when sunrise is but it flips to when sunset is in day time.

Thanks

Andy

I think this can work

$if(ai(isday)=1,df(hh:mm,ai(sunset)),df(hh:mm,ai(sunrise)))$

Thank you. Will give it a go