473,224 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Converting hex values to string

I have a byte array loaded with hex bytes read from a device on a com port. I need to convert the bytes into a string, but without doing any conversion to decimal, integer. etc. In other words, when I have a hex value of &H37, I need to convert it to a string of "37". Sounds simple, but has me puzzled so far.
Apr 2 '21 #1
1 4054
212 Expert 128KB
Hex will do that:

Expand|Select|Wrap|Line Numbers
  1. HexText = Hex(&H37)
  3. ? HexText
  4. 37
Apr 3 '21 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Chandra Mohan | last post by:
Hi All, In continuation to previous posting, I have one more query : A column with String containing hex values say, CA02B. I have to access the value in a int variable, any hints on how we...
by: Jus! | last post by:
Hi. I am reading bits(1's & 0's) from a file and i wa wondering what is the most efficient method of converting these strings to individual int's? eg. File contains: 110001 010011 etc......
by: tgif | last post by:
Can someone explain the format for converting a .NET datatype (such as string or int) to a database type (such as tinyint, datetime) for use in a SqlParameter.
by: Wouter vanEck | last post by:
Hi, I need to find a way to read a html type string from a database and add it to a placeholder control on the page and then I need to be able to populate the fields that were in that html...
by: gritbaby | last post by:
I have a SQL statement that keeps giving me this error: Error converting data type nvarchar to numeric. My select statement is the following: SELECT cast(Table.StringValue as numeric(4))...
by: Kevin S Gallagher | last post by:
I found this code (pretty sure it was from a MVP) for converting a string variable to a form object which works fine within a form. Take the code and place it into a code module and it fails on the...
by: rrp83 | last post by:
Hi All Can anyone fwd me the code for converting a string to bytes similar to the GetBytes function in C# and viceversa?? Regards, RRP83
by: CoreyWhite | last post by:
Problem: You have numbers in string format, but you need to convert them to a numeric type, such as an int or float. Solution: You can do this with the standard library functions. The...
by: Jef Driesen | last post by:
How can I convert a date string to a number (e.g. a time_t value or a tm struct)? I know about the strptime function, but then I have to know the format string. And that is a problem. I'm trying...
by: MayuriPaleja | last post by:
I am Converting a string value to single and then to double. For 1371818.28 i am getting Answer 137181.28125 For 1371818.29 i am getting Answer 137181.296875 Below is the code i am using. ...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.