Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
want to replace 'space' by '-' using sql query
Posted

1 solution

Don't.
Don't store the date as a string at all - store it as a DATE or DATETIME value instead, and let your presentation software handle the format for the display.

You can do it:
SQL
REPLACE('28 may 14', ' ', '-')
but it's not a good idea - sort out the storage and life generally becomes a lot easier later on!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900