Hello all.
I am trying to figure out how to create a date and time, where the field is null.
I am pulling records that are 24 hours from a user picked date and hour where the user enters a date ([Report Date]="5-10-17") and hour ([Hour]="5" .
Statement:
WHERE (((DateAdd("h",0-[Hour],[detailStartDateTime]))<DateAdd("h",24,DateValue([Report Date]))) AND ((IIf(Not IsNull([detailStopDateTime]),DateAdd("h",0-[Hour],[detailStopDateTime])))>=DateAdd("h",0,DateValue([Report Date]))))
Does anyone know how I can create this date and time in the correct format from the user input?
Thank you
I am trying to figure out how to create a date and time, where the field is null.
I am pulling records that are 24 hours from a user picked date and hour where the user enters a date ([Report Date]="5-10-17") and hour ([Hour]="5" .
Statement:
WHERE (((DateAdd("h",0-[Hour],[detailStartDateTime]))<DateAdd("h",24,DateValue([Report Date]))) AND ((IIf(Not IsNull([detailStopDateTime]),DateAdd("h",0-[Hour],[detailStopDateTime])))>=DateAdd("h",0,DateValue([Report Date]))))
Does anyone know how I can create this date and time in the correct format from the user input?
Thank you