Hi Everyone, doing a simple call to a SharePoint Document library to return the custom metadata fields related to a file. What's interesting is I can set the column type to 'Single line of text' in SharePoint but if I put certain numbers into the column it returns as a datetime object.
If I put text in the field on SharePoint it returns correctly as text or even if I put enough numbers it returns as text as well.
In the example below the Doc_ID column in SharePoint contains the numbers 1212.


result = await (
client.drives.by_drive_id(drive_id)
.items.by_drive_item_id(drive_item_id)
.list_item.get()
)
print(result.fields.additional_data["Doc_x0020_ID"])
print(type(result.fields.additional_data["Doc_x0020_ID"]))
Output:
1212-01-01 00:00:00+00:00
<class 'pendulum.datetime.DateTime'>
This seems like unexpected behavior?
Hi Everyone, doing a simple call to a SharePoint Document library to return the custom metadata fields related to a file. What's interesting is I can set the column type to 'Single line of text' in SharePoint but if I put certain numbers into the column it returns as a datetime object.
If I put text in the field on SharePoint it returns correctly as text or even if I put enough numbers it returns as text as well.
In the example below the Doc_ID column in SharePoint contains the numbers 1212.


Output:
This seems like unexpected behavior?