Author Topic: CONVERT DECIMAL VALUE TO SPOKEN TIME  (Read 821 times)

Pannam

  • Newbie
  • *
  • Posts: 14
CONVERT DECIMAL VALUE TO SPOKEN TIME
« on: December 01, 2020, 11:28:43 PM »
I am using the GetValue function to get the current flight simulator time from FSUIPC via SPADNEXT.
For example  FSUIPC!0000!0C20 = 15:32:22

I went thru the manual and tried using this function

 
{DATETIMEFORMAT:dateVariableName:textFormatVariable} but I simply can't get it to work

This is what I have done so far

Execute external plugin / GetValue / Decimal Variables / FSUIPC!0000!0C20
when I look at the log the value for FSUIPC!0000!0C20 is correct but I just can't get it to speak

say, {FSUIPC!0000!0C20}

I just want it to speak out the time without the seconds (if possible)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: CONVERT DECIMAL VALUE TO SPOKEN TIME
« Reply #1 on: December 02, 2020, 12:06:11 AM »
You need to use the token appropriate for the variable type in order to retrieve its value; You can't just stick the name between brackets...

This topic attempts to summarize information on tokens and variables.


The "{DATETIMEFORMAT:}" token takes a date/time variable as its first parameter, not a text variable.

You need to use the "Convert a Variable Value" action to convert the value of your text variable and store it in a date/time variable, after which you can use the "{TIME:}" token to retrieve that value if you're just looking for hours and minutes without seconds.