Add-PnPLIstItem errors if a date is null or " " or date is not in US format

%3CLINGO-SUB%20id%3D%22lingo-sub-207027%22%20slang%3D%22en-US%22%3EAdd-PnPLIstItem%20errors%20if%20a%20date%20is%20null%20or%20%22%20%22%20or%20date%20is%20not%20in%20US%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207027%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20how%20to%20stop%20Add-PnPListItem%20erroring%20if%20the%20string%20input%20to%20a%20date%20field%20is%20null%20or%20%22%20%22%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20do%20I%20have%20to%20convert%20all%20of%20my%20dates%20to%20US%20format%20for%20Add-PnPListItem%20to%20work%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-207027%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Regular Contributor

Hi

 

Does anyone know how to stop Add-PnPListItem erroring if the string input to a date field is null or " " ?

 

Also do I have to convert all of my dates to US format for Add-PnPListItem to work ?

 

Thanks

 

Nigel

0 Replies