mysql - convert string with time to date only -
i have column holds date values varchar in format of
date_n date_s 2016-11-10::12:36:05 2016-nov-10::12:36:05 2016-11-10 2016-nov-10 now need date both of columns able column date_n along timestamp , nothing date_s query tried as
select * table cast(date_n date)=curdate(); which returns both element result when change date_n date_s returns empty , need output date no time stamp
so there way sort out
hi try logic
where trim(upper(substring_index(date_s,':',1))) = trim(concat(year(now()),' -',upper(substring((monthname(str_to_date(month(now()),'%m'))),1,3)),'-',day(now())))
Comments
Post a Comment