Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server function to convert temperature to Kelvin


KELVIN
 
Updated: 01 December 2008 

Use KELVIN to convert from Celsius, Fahrenheit, or Rankine to Kelvin.
Syntax
SELECT [westclintech].[wct].[KELVIN] (
  <@Temperature, float,>
 ,<@From_scale, nvarchar(4000),>)
Arguments
@Temperature
is any real number. @Temperature is an expression of type float or of a type that can be implicitly converted to float
@From_scale
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
float
Remarks
·         KELVIN is calculated according the following formula:
°K = °C + 237.15
°K = (°F + 459.67) * 5 / 9
°K = °R * 5 / 9
Example
 
select wct.KELVIN(100, 'C')
Here is the result set
----------------------
373.15
 
(1 row(s) affected)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service