Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5060 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Because it is an accepted format to express a sexagesimal value - and also because the result remains usable for further calculations.

And - I forgot to mention - you could let the Time function do all the work, i.e.

Time ( 0 ; 0 ; adj )






BTW, you can do this even with your text result, e.g.




Hour ( adj ) & "°" & ... 

Posted

This is a nice suggestion !

So I end up with:

Let([

adj = "(" & Substitute ( TrimAll ( input ; 1 ; 3 ) ; [ ¶ ; "" ] ; [ "-" ; ")-("] ; [ "+" ; ")+("] ; [ "*" ; ")*(" ] ; [ "/" ; ")/("] ; [ "x" ; ")*(" ] ; [ ":" ; ")/("]) & ")" ;

adj = Mod ( Evaluate ( Substitute ( adj ; [ "()" ; ""] ; [ "°" ; "*3600 "] ; [ "'" ; "*60 "] ; [ "\"" ; " "] ;[ " " ; "+"] ; [ "+)" ; ")" ] ) ) ; 360*3600 )

];

Hour ( adj ) & "°" & If ( Minute ( adj ) ; Minute ( adj ) & "'" ) & If ( Seconds ( adj ) ; Seconds ( adj ) & "\"" )

)

BTW: I wished to use the List ( ) function in the result ( to get only not empty values ), but could not find a way.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.