I have a date column date CHAR(7) CHARACTER SET LATIN NOT CASESPECIFIC, where I have some values ββlike 2010-12, 2011-10, etc. I want to change them in the date format yyyy / mm. How should I do it? Thanks
date CHAR(7) CHARACTER SET LATIN NOT CASESPECIFIC,
Just apply FORMAT executing CAST:
SELECT CAST('2010-12' AS DATE FORMAT 'YYYY/MM')
This returns the valid date from the day set on the 1st of this month.
Source: https://habr.com/ru/post/1496088/More articles:Android - ObjectAnimator sets rotation value - androidHow to add empty attribute to rails form_for tag? - ruby ββ| fooobar.comLinked list with multiple parent and child nodes - cExtract characters from string in php - stringThe difference between a static variable declared in different areas - c ++After exiting, the full screen MPMoviePlayerController set the zoom mode to MPMovieScalingModeFill in ios - iosMake a chrome taskbar icon on the taskbar when chrome is minimized - javascriptCreating JSP templates (views) dynamically from a database - javaSCons and / or CMake: any way to automatically display from the header included at compile time to "the corresponding object file must be linked"? - buildMissing valid coverage data available in Rails stats report - ruby-on-railsAll Articles