Hi,
I am trying to insert some fields of a table into another table. The time field of the first table stores unix epoch time that I want to be convert into a readable format before being inserted into the second table. I tried the following query but time formatting is not working.
INSERT INTO TimeIconPortionID ( Participant_ID, [Time], IconID, Portion1, Portion2, Portion3, Portion4, Portion5, Portion6 )
SELECT logP1.Participant_ID, Format(DateAdd("s",([logP1.MealTime]-21600),#1/1/1970#),"dd mm yyyy @ hh:mm:ss") AS myTime, logP1.FoodID, logP1.Portion1, logP1.Portion2, logP1.Portion3, logP1.Portion4, logP1.Portion5, logP1.Portion6
FROM logP1;
Any help?
I am trying to insert some fields of a table into another table. The time field of the first table stores unix epoch time that I want to be convert into a readable format before being inserted into the second table. I tried the following query but time formatting is not working.
INSERT INTO TimeIconPortionID ( Participant_ID, [Time], IconID, Portion1, Portion2, Portion3, Portion4, Portion5, Portion6 )
SELECT logP1.Participant_ID, Format(DateAdd("s",([logP1.MealTime]-21600),#1/1/1970#),"dd mm yyyy @ hh:mm:ss") AS myTime, logP1.FoodID, logP1.Portion1, logP1.Portion2, logP1.Portion3, logP1.Portion4, logP1.Portion5, logP1.Portion6
FROM logP1;
Any help?