Extract only Date from DateTime value

Scenario

We have a datetime column DueDate in a SQL table. I need to display only date version in a label in Power Apps Gallery. Below is the code:

Text(ThisItem.DueDate,"dd-mmm-yyyy")

This will return 11-Jan-2023

Insert Date Value to SQL from DateTime Picker

Scenario:

There is a SQL Server Table Project_Details with a column Due_Date of type datetime. In Canvas Apps, we have a collection named projectDetailsColl in which we are collecting Projects Details like txtProjectName as Text Input, dtpDueDate as Date Picker. The requirement is to save the values from collection to SQL table.

Below is the code for this:

ForAll(projectDetailsColl,
    Patch(Project_Details, Defaults(Project_Details),
    {
        ProjectName: projectDetailsColl[@ProjectName],
        DueDate: DateTimeValue(projectDetailsColl[@DueDate]),
        ModifiedBy: User().Email,
        ModifiedDate: Today()
    })
)