SharePoint 2013 Calculated Column displaying time as 12:00AM

Kelly Taggart 216 Reputation points
2020-08-04T01:54:20.89+00:00

I am have several calculated columns in a list but with one of my columns it is setting the time to 12:00AM. The calculated column is:-

=DATE(YEAR([Start Date]),MONTH([Start Date]),1)

15421-calculated-column.png

[Start Date] is just a date/time column. [Calc_FirstofMonth] is the Calculated Column and is also set to Date/Time. I tried a few things but cannot find the right syntax to add to this formula to display the time as it is in [Start Date].

Any advice?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,246 questions
0 comments No comments
{count} votes

Accepted answer
  1. JoyZ 18,046 Reputation points
    2020-08-04T06:31:06.45+00:00

    DATE function only returns year, month and day, it will not return time.

    Please use DATETIME function as follows:

    DATETIME(YEAR([Start Date]),MONTH([Start Date]),1,HOUR([Start Date]),MINUTE([Start Date]),SECOND([Start Date]))  
    

    Result:

    15387-image.png

    References:

    https://support.microsoft.com/en-us/office/datetime-function-812ad674-f7dd-4f31-9245-e79cfa358a4e

    https://learn.microsoft.com/en-us/dax/date-function-dax


0 additional answers

Sort by: Most helpful