Obtain date without timestamp in DB2 -


please pardon ignorance if have missed documentation/solution same. searched web , not find answer.

i have simple question. in db2 table,i have column of type date , data of format 04/25/2013 12:00:00am . when query db2 database, want obtain date , not timestamp i.e obtain "04/25/2013" , not "04/25/2013 12:00:00am". tried date(column name) , gave complete value including time stamp.

this looks timestamp , not date column. if indeed timestamp column try this:

select varchar_format(current timestamp, 'mm/dd/yyyy') sysibm.sysdummy1 ; 

just replace current timestamp in above example column , sysibm.sysdummy1 table.

the thing varchar_format lets format timestamp. change 'mm/dd/yyyy' part 'yyyy.mm.dd' format '2017.08.18'.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -