Hello all--I've got a query where the date in the tables is this format yyyymmdd and I'm trying to change it to mm/dd/yyyy. I have successfully been able to do this for several dates in the PPOLC table by using the CDate function, for example, Issue Date: CDate(Mid(dbo_G_PPOLC!ISSUE_DATE,5,2) & "/" & Right(dbo_G_PPOLC!ISSUE_DATE,2) & "/" & Left(dbo_G_PPOLC!ISSUE_DATE,4)).
However, I am trying to do the same thing for a date that I needed to add to this query from another table. The date field in this new table is the same as the issue date above in the PPOLC table but when I run the query, I get the data type mismatch in criteria expression error. I cannot figure out where the problem is. Here is the expression I wrote for the new date field: Activation Date: CDate(Mid([dbo_G_PPOLM]![PROCESSED_DATE],5,2) & "/" & Right([dbo_G_PPOLM]![PROCESSED_DATE],2) & "/" & Left([dbo_G_PPOLM]![PROCESSED_DATE],4))
Does anyone have any suggestions as to how I might convert this "PROCESSED_DATE" into the mm/dd/yyyy format?
Thanks so much for your help!
However, I am trying to do the same thing for a date that I needed to add to this query from another table. The date field in this new table is the same as the issue date above in the PPOLC table but when I run the query, I get the data type mismatch in criteria expression error. I cannot figure out where the problem is. Here is the expression I wrote for the new date field: Activation Date: CDate(Mid([dbo_G_PPOLM]![PROCESSED_DATE],5,2) & "/" & Right([dbo_G_PPOLM]![PROCESSED_DATE],2) & "/" & Left([dbo_G_PPOLM]![PROCESSED_DATE],4))
Does anyone have any suggestions as to how I might convert this "PROCESSED_DATE" into the mm/dd/yyyy format?
Thanks so much for your help!