I am trying to insert data into a table from another table. The problem comes in with the unix timestamp column. It always converts the the date to 0000-00-00 but if you run the select query by itself it works just fine(Gives the correct date). Could someone see what I am doing wrong. Here is my SQL statement:
Thanks for you help.
Randy
Code:
Insert Into HistoryPeaksSGBW (SGID_HPSGBW, Bandwidth_HPSGBW, SDStreams_HPSGBW, HDStreams_HPSGBW, EffectiveStreams_HPSBW, TimeStamp_HPSGBW)
Select SGID_CSGBW, Bandwidth_CSGBW, SDStreams_CSGBW, HDStreams_CSGBW, EffectiveStreams_CSGBW, FROM_UNIXTIME(TimeStamp_CSGBW,'%Y-%d-%m')
from CurrentSGBW
Thanks for you help.
Randy