What function to fo...
 
Notifications
Clear all

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

4 Posts
2 Users
0 Reactions
1,314 Views
(@fonsuak)
Eminent Member
Joined: 3 years ago
Posts: 11
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
(@romainrob)
Honorable Member
Joined: 5 years ago
Posts: 530
 

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


   
ReplyQuote
(@fonsuak)
Eminent Member
Joined: 3 years ago
Posts: 11
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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

@fonsuak De rien 😉


   
ReplyQuote
Share: