CELSIUS
Updated 2023-11-09 14:59:26.993000
Syntax
SELECT [westclintech].[wct].[CELSIUS] (
<@Temperature, float,>
,<@From_scale, nvarchar(4000),>)
Description
Use the scalar function CELSIUS to convert from Fahrenheit, Kelvin or Rankine to Celsius.
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 Type
float
Remarks
CELSIUS is calculated according the following formula:C° = (F° – 32) * 5 / 9C° = K° – 273.15C° = (R° - 491.67) * 5 / 9
Examples
select wct.CELSIUS(100, 'F');
Here is the result set.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"37.7777777777778"}]}