Search code examples
sap-ase

DAte Format in Sybase


How can I convert a column of datetime data which stores value like this by default in Sybase

Sep 15 1999 12:23:56:230AM 

to this format:

MM/DD/YY HH:MI:SS,FF9

I don't see any option for convert function


Solution

  • Do it yourself:

    declare @test datetime
    select @test = getdate()
    
    select convert(varchar, @test, 1) + ' ' + convert(varchar, @test, 108) + ',FF9'