New to forum but I've been reading, reviewing, and learning from this forum for a while...
My question:
I have a query the includes an expression that produces an HR deadline date based on an employee's hiring paperwork's start date and the HR pay-period's beginning and end date. I've written the formula correctly (I get the expected results), but the output is converted to a text field as opposed to a date field.
Here is SQL of the query and some additional information - the expression is colored blue.
SELECT tblePAF_HISTORY_APPROVAL.ePAF_Num, Min(IIf([Effective_Date]>=[tblHRDeadlines].[PP_Begin],IIf([Effective_Date]<=[tblHRDeadlines].[PP_End],[tblHRDeadlines].[Due_to_HR],"unknown"))) AS HRDeadline, tblePAF_HISTORY_APPROVAL.Effective_Date
FROM tblePAF_HISTORY_APPROVAL, tblHRDeadlines
GROUP BY tblePAF_HISTORY_APPROVAL.ePAF_Num, tblePAF_HISTORY_APPROVAL.Effective_Date;
Each of the above-referenced fields is a date data-types.
Why is the output for "HRDeadline" text, and how do I make it a date data-type?
My question:
I have a query the includes an expression that produces an HR deadline date based on an employee's hiring paperwork's start date and the HR pay-period's beginning and end date. I've written the formula correctly (I get the expected results), but the output is converted to a text field as opposed to a date field.
Here is SQL of the query and some additional information - the expression is colored blue.
SELECT tblePAF_HISTORY_APPROVAL.ePAF_Num, Min(IIf([Effective_Date]>=[tblHRDeadlines].[PP_Begin],IIf([Effective_Date]<=[tblHRDeadlines].[PP_End],[tblHRDeadlines].[Due_to_HR],"unknown"))) AS HRDeadline, tblePAF_HISTORY_APPROVAL.Effective_Date
FROM tblePAF_HISTORY_APPROVAL, tblHRDeadlines
GROUP BY tblePAF_HISTORY_APPROVAL.ePAF_Num, tblePAF_HISTORY_APPROVAL.Effective_Date;
Each of the above-referenced fields is a date data-types.
Why is the output for "HRDeadline" text, and how do I make it a date data-type?