Forum Discussion

María José Pedreira's avatar
María José Pedreira
Brass Contributor
Jun 29, 2017

Datetime Format for site columns - PNP

Hi, I need to add a new site column, with DateTime Type, using PnP. I can do that using next command: Add-PnPField -DisplayName "Birthday" -InternalName "dateBirthday" -Group "TEST" -Type Dat...
  • Pieter Veenstra's avatar
    Jun 29, 2017

    Hi María José Pedreira

     

    Try this:

     

    Add-PnPFieldFromXml '<Field Type="DateTime" DisplayName="My Test Column" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" Format="DateOnly" Group="Custom Columns" FriendlyDisplayFormat="Disabled" ID="{10ce4fed-921a-4d51-a870-534605bf89be}" SourceID="{6cf53ae4-314b-435e-9685-19b7f7b8df07}" StaticName="MyTestColumn2" Name="MyTestColumn2"></Field>'

     

Resources