I made a sharepoint 2013 list in powershell, it has a date field, but I want the date field to be "Date Only" but I don't know how to do that in powershell code.

Does anyone know?


enter image description here


$myFieldName = $myList.Fields.Add(“Date”, “DateTime”, 0)
$myList.Fields[$myFieldName ].Title = “Date”
$myList.Fields[$myFieldName ].Required = $true;
#$myList.Fields[$myFieldName ].Type = "DateOnly";
$myList.Fields[$myFieldName ].Update()
  • The property you're looking for is called "DisplayFormat" as you can see in my answer.
    – Andreas
    Dec 22, 2015 at 18:03

1 Answer 1


It's fairly straight forward I would say.

// First get your field using the title from your list
$field = $list.Fields["FieldTitle"] 
// Alternativly you could use $list.Fields.GetFieldByInternalName("InternalFieldName")

$field.DisplayFormat = "DateOnly"

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.