Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert temperature to Fahrenheit

Updated: 01 December 2008 

Use FAHRENHEIT to convert from Celsius, Kelvin, or Rankine to Fahrenheit.
SELECT [westclintech].[wct].[FAHRENHEIT] (
  <@Temperature, float,>
 ,<@From_scale, nvarchar(4000),>)
is any real number. @Temperature is an expression of type float or of a type that can be implicitly converted to float
is the description of the units for @Temperature. @From_scale must be a valid value as specified in temperature unit representations@From_scale must be of a data type that is implicitly convertible to varchar.
Return Types
·         FAHRENHEIT is calculated according the following formula:
°F = °C * 9 / 5 + 32
°F = °K * 9 / 5 - 459.67
°F = °R - 459.67
select wct.FAHRENHEIT(100, 'K')
Here is the result set
(1 row(s) affected)

Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service