-1

How to convert the Big Int into datetime with style 109 that starts with mon dd yyyy hh:mi:ss:mmmAM

632979854880200000 is the Big INT

select Convert(Datetime,((632979854880200000 - 599266080000000000) / 864000000000),109) AS Datetime from Abc

LogicalAnt
  • 907
  • 3
  • 12
  • 28
Jason312
  • 197
  • 1
  • 1
  • 10

1 Answers1

0

Example

select ViaConvert = Convert(varchar(30),Convert(Datetime,((632979854880200000 - 599266080000000000) / 864000000000.0)),109)
      ,ViaFormat  = Format(Convert(Datetime,((632979854880200000 - 599266080000000000) / 864000000000.0)),'MMM dd yyyy hh:mm:ss tt')

Returns

ViaConvert                    ViaFormat
Nov  1 2006  1:44:48:017PM    Nov 01 2006 01:44:48 PM
John Cappelletti
  • 79,615
  • 7
  • 44
  • 66