SJD SJD - 1 year ago 82
SQL Question

how to remove space between two strings in sql

I have a query

CONVERT(CHAR(4), A.effort_date, 100) + CONVERT(CHAR(4), A.effort_date, 120) as Month

The result shows
Jun 2014

But I want to show

Have tried replace,
nothing seems to be working.

Any suggestions please?

format is
in sql table.

Answer Source

Assume you are using MSSQL, which convert format 100 is mon dd yyyy hh:miAM (or PM)

you can try

convert(char(3), A.effort_date, 100) + convert(char(4), A.effort_date, 120) as Month
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download