DateTime2_To_UnixTime

Converts a datetime2 value to a Unix Time (Epoch) value.

  • Free Function
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

SELECT SQLHTTP.net.DateTime2_To_UnixTime ( @DateTime2 )

Arguments:

Name Type Description
@DateTime2 datetime2 Value to convert to Unix time ( epoch ) value.

Return Type:

numeric(20,7)

Sample Usage:

See Also: