antosnowin
antosnowin

Reputation: 221

How to format date to mmddyyhrmin in sybase

i want the date format in mmddyyhhmin . Can anyone help me in achieving this. for eg : FOR GETDATE RESULT SHOULD BE "032520130550"

Upvotes: 2

Views: 113

Answers (1)

Robert
Robert

Reputation: 25763

Try this:

select str_replace(convert(varchar,getdate(),101),'/',null)+str_replace(convert(char(5),getdate(),108),':',null)

Upvotes: 2

Related Questions