Nested Query or Function ?

SteveE

Registered User.
Local time
Today, 02:56
Joined
Dec 6, 2002
Messages
221
Need some help with Date time calculations
I receive orders which rules are required agianist the file Day/Time stamp
ie. File Name contains the string 20110922032802 = yyyymmddhhnnss = Thurs 22/9/2011 03:28:02

The Rules are against the DAY and Time and need to function as below:

if a file type A is received MON > [RuleTime i.e 08.00] then Do This from the Process Rules Table
else
if a file type A is received MON < [RuleTime i.e 08.00] then Do This from the Process Rules Table


I have this query which works but I need to repeat it for each day and each file type (17 at present) this becomes "too complex"

ProcessDay: IIf([UploadDay]="Mon",IIf([UploadDay]="MON" And [UploadTime]>[CutTime],[ProcessLate] & " - " & [ProcessDeliveryLate],[ProcessEarly] & "- " & [ProDeliveryEarly]))

What would be the best approache to this ?
Any advise appricated
 
Is the timestamp stored in the original format in the table?

By the way, your IIF() function should be sufficient but it just needs tweaking.
 
thanks for the reply:
In the process of typing my reply I just reailised how stupid I am and solved my issue by referencing the stored DAY in my process table.

thanks for the reply All sorted now !!
 

Users who are viewing this thread

Back
Top Bottom