I am attempting to add a Data Grid to a form. The Data Grid will only be used to display data to the users. They will not be able to add, edit, or delete records. The Data Grid is configured with a Lookup to get the data that needs to be displayed.
Two of the fields that are being returned by the query are datetime fields in the database. However, I only want to display the Date portion of the field in the Data Grid formatted as MM/dd/yyyy. I am using a FORMAT function in my lookup query to reformat the dates like this:
FORMAT(th.PREndDate,'MM/dd/yyyy') as PREndDate
,FORMAT(th.PostDate,'MM/dd/yyyy') as PostDate
When I validate the query and view the Raw Data, the date fields are formatted as I expected them to be:
But if I validate and view the Formatted Data, the dates are showing in a long ISO format:
And thus when I test my form and view the Data Grid, the dates are in this same ugly format:
How can I get these dates to display the way I want them to (MM/dd/yyyy) in the data grid?
Please sign in to leave a comment.