Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1099457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:44:22+00:00 2026-05-17T00:44:22+00:00

When I do the following: DECLARE @x float SET @x = 1234.5 SELECT CONVERT(varbinary,

  • 0

When I do the following:

DECLARE @x float
SET @x = 1234.5
SELECT CONVERT(varbinary, @x)

What is the returned format? I need to get the original number back from .net somehow, and I only have the binary value available.

Clarification:

The statement above returns

(no column name)
0x40934A0000000000

Somehow, I must get the value 12345.5 back from the binary data 0x40934A0000000000.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:44:23+00:00Added an answer on May 17, 2026 at 12:44 am

    Apparently the format is IEEE 64-bit, but the byte ordering is the reverse of what BitConverter.ToDouble expects. The number can be retrieved with this code:

    long bits = 0;
    for (int i = 0; i < 8; i++)
        bits = (bits << 8) | data[i];
    return BitConverter.Int64BitsToDouble(bits);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following query: DECLARE @Region VARCHAR(MAX) SET @Region = '' SELECT @Region
Hi i am using the following dynamic sql: declare @cmd nvarchar(4000) set @cmd= 'select
In the following query declare @a float(23) declare @b float(23) declare @c float(53) set
Consider the following sql server query , DECLARE @Table TABLE( Wages FLOAT ) INSERT
I have the following code: DECLARE @testDate date --SET @testDate=dateadd(wk, 5830, 0) SET @testDate='2011-09-26
I've got the following sql code: declare @x xml set @x = '<ResultBlock> <MatchSummary
Consider following script: SET LANGUAGE 'German' GO SET DATEFIRST 1 GO DECLARE @FullDate DATETIME
I need help with the following code that requires me to: Declare 3 double
Given the following data/schema: DECLARE @t1 TABLE ( Id int NOT NULL ) DECLARE
I have the following as two ways to declare a two dimensional String array.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.