LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract last 4 digits from a hexadecimal output and convert it into decimal?

I have a program when it runs it gives a hexadecimal output (Eg: FFFF00B7). I want to extract last 4 digits (from the example: 00B7) and convert it into decimal(from the example: the output should be 183). How can I do this? Can anyone give me a sample program?

0 Kudos
Message 1 of 7
(3,918 Views)

The Hexadecimal String To Number Funtion does this job.  Just specify the according offset and you are done.

0 Kudos
Message 2 of 7
(3,905 Views)

@ouadji wrote:

As GuenterMueller just said,

 

SR1.png


Really?

Are you looking for an honorable mention in the R-G thread?Smiley Wink

!0.png

 


"Should be" isn't "Is" -Jay
Message 4 of 7
(3,866 Views)

in the R-G thread ... Smiley Wink Smiley Very Happy

 

ok, but my version is valid for x last digits.

 

Yours only works for the 4 last ones.
 
(That said, well done)
0 Kudos
Message 5 of 7
(3,856 Views)

and this one ?

 

valid for x last digits ... (here for the 4 last digits)

 

SR1.png

0 Kudos
Message 6 of 7
(3,851 Views)

@JÞB wrote:
Really?

Are you looking for an honorable mention in the R-G thread

 

 


Thanks for pointing it out, Jeff.  

Re-reading the initial post now makes me see that there was no string data mentioned.

Guenter

0 Kudos
Message 7 of 7
(3,829 Views)