What function to fo...
 
Notifications
Clear all

What function to format "55.0 L" into "55.0" ?


fonsuak
(@fonsuak)
Active Member
Joined: 9 months ago
Posts: 10
Topic starter  

In order to create an indicator for the fuel used, I need to get a numeric value out of [GameRawData.SessionData.CarSetup.Chassis.Rear.FuelLevel] which atm it's sitting at "55.0 L" and in order to operate with it, I need it formatted to "55.0"

Is there any function I can use to achieve this format of data that is given with its units?

Thank you all very much for your time! 


Quote
Topic Tags
Romainrob
(@romainrob)
Reputable Member
Joined: 3 years ago
Posts: 350
 

Hi,
Try: replace([GameRawData.SessionData.CarSetup.Chassis.Rear.FuelLevel], ' L', '')


ReplyQuote
fonsuak
(@fonsuak)
Active Member
Joined: 9 months ago
Posts: 10
Topic starter  

@romainrob the man himself!

Thank you very much man, that totally worked. Never used that function and it truly opens a ton of possibilities for me!

Merci beaucoup!


ReplyQuote
Romainrob
(@romainrob)
Reputable Member
Joined: 3 years ago
Posts: 350
 

@fonsuak De rien 😉


ReplyQuote
Share: