How can I put a field in my query, with all data hourly incremented between 01 January 2015 to 31 December 2015.
Please forgive my inability.
How can I put a field in my query, with all data hourly incremented between 01 January 2015 to 31 December 2015.
Please forgive my inability.
A SELECT query can't create records.
What exactly do you mean by 'all data hourly incremented'? What data do you have? Show examples of raw data and desired output.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Like in Excel. A series begin with 01.01.2015 00:00; 01.01.2015 01:00; 01.01.2015 02:00;... to 31.12.2015 23:00.
My server receives data via antenna. Sometimes the signal is missing and needs to introduce averages for missing times.
Thank you for your interest.
Still not enough info.
What do you mean 'like in Excel'? How does Excel pertain to your Access data?
That still doesn't show example of your raw data and desired output.
What does 'introduce averages' mean - do you need to create records?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes, I need to create records from 01.01.2015 00:00 incremented by 1 hour, to 31.12.2015 23:00. For each record must be populated with registered value or calculated (averaged) value in missing case.
So create records only for missing time slots? Will require VBA procedure. Something like:
Code:Public Sub Times() Dim dateStart As Date, dateEnd As Date dateStart = Me.tbxStart dateEnd = Me.tbxEnd Do While dateStart < dateEnd If IsNull(DLookup("ID", "tablename", "datefield=#" & dateStart & "#")) Then CurrentDb.Execute "INSERT INTO tablename(datefield) VALUES(#" & dateStart & "#)" End If dateStart = DateAdd("h", 1, dateStart) Loop End Sub
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.