I am currently working on an excel program that obtains data from a data entry worksheet to a display worksheet using vba and macros. The majority of the data can transfer properly, except for the Time field.
To give an example the data in Time field is written like this: "12:00 PM" I'm using custom format of h:mm AM/PM.
To link it to the display worksheet I use a SQL string to call for the data in the data entry work sheet and added a button to execute the code. However the data for Time in display worksheet became: "0/1/1900 12:00:00 PM"
What's more, after executing the code the time in the data entry which I set the format initially became the same as the one in display worksheet.
The display worksheet functions using 3 SQL commands as seen below.
select * from EntryTable select A.*,[Date + Time] from Summary1 A left join (select [Die No], max(Date + Time) as [Date + Time] from Summary1 group by [Die No]) B on A.[Die No] = B.[Die No] select * from Summary2 where [Date + Time] = Date + Time
Can someone please share with me if this is a SQL execution error or something else entirely?