René's URL Explorer Experiment


Title: A list item field with value 'PT' being converted to Datetime object · Issue #1340 · microsoftgraph/msgraph-sdk-python · GitHub

Open Graph Title: A list item field with value 'PT' being converted to Datetime object · Issue #1340 · microsoftgraph/msgraph-sdk-python

X Title: A list item field with value 'PT' being converted to Datetime object · Issue #1340 · microsoftgraph/msgraph-sdk-python

Description: Describe the bug I am trying to iterate through a SharePoint list entries/rows for further processing: ... list = await client.sites.by_site_id(site_id).lists.by_list_id(list_id).items.get(request_configuration=request_config) rows = [] ...

Open Graph Description: Describe the bug I am trying to iterate through a SharePoint list entries/rows for further processing: ... list = await client.sites.by_site_id(site_id).lists.by_list_id(list_id).items.get(request_...

X Description: Describe the bug I am trying to iterate through a SharePoint list entries/rows for further processing: ... list = await client.sites.by_site_id(site_id).lists.by_list_id(list_id).items.get(request_...

Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-python/issues/1340

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A list item field with value 'PT' being converted to Datetime object","articleBody":"### Describe the bug\n\nI am trying to iterate through a SharePoint list entries/rows for further processing:\n...\nlist = await client.sites.by_site_id(site_id).lists.by_list_id(list_id).items.get(request_configuration=request_config)\n\nrows = []\nfor item_id in list.value:\n    fields = item_id['fields']\n    rows.append(fields.additional_data.get(\"code\")) # test\nrows\n\nbut when text/string field have value 'PT' it is retrieved as a datetime (exactly: \"datetime.timedelta(0)\"). It makes my code useless for keeping for example 'Country Code' as list's field. I have seen similar issue before with 4-digit strings, so maybe it is related.\n\nPlease, take a moment to look at this.\n\nhere some screenshots:\n\nlist in SP (just field 'code' and its values) :\n\n\u003cimg width=\"178\" height=\"303\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/13a8e144-e0ca-4ba1-986a-91d6e7543bb4\" /\u003e\n\nand my code results:\n\n\u003cimg width=\"267\" height=\"100\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/185229b7-7e7b-41f9-ad2c-3bf03778cd56\" /\u003e\n\n\n### Expected behavior\n\nExpected behavior would be to display 'code' the same way as it is in SharePoint list, means:\nPT\nPTA\n..\n\n\n### How to reproduce\n\nTo reproduce please just create new list with text field. Then add value 'PT' to this field and try to use await client.sites.by_site_id(site_id).lists.by_list_id(list_id).items.get(request_configuration=request_config) for entried reading.\n\n### SDK Version\n\n1.40.0\n\n### Latest version known to work for scenario above?\n\n_No response_\n\n### Known Workarounds\n\n_No response_\n\n### Debug output\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand log\u003c/summary\u003e\n```\n\n\u003cLog output here\u003e\n\n```\n\u003c/details\u003e\n\n\n### Configuration\n\n_No response_\n\n### Other information\n\n_No response_","author":{"url":"https://github.com/SirTomRat","@type":"Person","name":"SirTomRat"},"datePublished":"2025-09-08T21:02:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1340/msgraph-sdk-python/issues/1340"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b4d15df5-db41-b262-fbf2-cb368fc515e3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9228:244BC2:2E36AAF:3D5D0EF:696F1912
html-safe-nonce7c90c9f59776c3948e2736fbd45c9b77ebe74af4faf9879b782ce83694c8b879
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjI4OjI0NEJDMjoyRTM2QUFGOjNENUQwRUY6Njk2RjE5MTIiLCJ2aXNpdG9yX2lkIjoiNjkzNzUyOTk0MDQ4ODE2NTY1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5a5493a32c61c28fe575acb0cefbd092272650faa97cdc04177e0435fc4ec8a0
hovercard-subject-tagissue:3395730362
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-python/1340/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1b57a701cc3b504ea1efe61705756a5a909471527087c284ed1637e0b20e019f/microsoftgraph/msgraph-sdk-python/issues/1340
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1b57a701cc3b504ea1efe61705756a5a909471527087c284ed1637e0b20e019f/microsoftgraph/msgraph-sdk-python/issues/1340
og:image:altDescribe the bug I am trying to iterate through a SharePoint list entries/rows for further processing: ... list = await client.sites.by_site_id(site_id).lists.by_list_id(list_id).items.get(request_...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSirTomRat
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
turbo-cache-controlno-preview
go-importgithub.com/microsoftgraph/msgraph-sdk-python git https://github.com/microsoftgraph/msgraph-sdk-python.git
octolytics-dimension-user_id17304259
octolytics-dimension-user_loginmicrosoftgraph
octolytics-dimension-repository_id534665999
octolytics-dimension-repository_nwomicrosoftgraph/msgraph-sdk-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id534665999
octolytics-dimension-repository_network_root_nwomicrosoftgraph/msgraph-sdk-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues/1340#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-python%2Fissues%2F1340
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-python%2Fissues%2F1340
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoftgraph%2Fmsgraph-sdk-python
Reloadhttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues/1340
Reloadhttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues/1340
Reloadhttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues/1340
microsoftgraph https://patch-diff.githubusercontent.com/microsoftgraph
msgraph-sdk-pythonhttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python
Fork 84 https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python
Star 561 https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python
Code https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python
Issues 89 https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues
Pull requests 17 https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/pulls
Discussions https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/discussions
Actions https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/actions
Projects 0 https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/security
Please reload this pagehttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues/1340
Insights https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/pulse
Code https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python
Issues https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues
Pull requests https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/pulls
Discussions https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/discussions
Actions https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/actions
Projects https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/projects
Security https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/security
Insights https://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-python/issues/1340
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-python/issues/1340
A list item field with value 'PT' being converted to Datetime objecthttps://patch-diff.githubusercontent.com/microsoftgraph/msgraph-sdk-python/issues/1340#top
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com/SirTomRat
https://github.com/SirTomRat
SirTomRathttps://github.com/SirTomRat
on Sep 8, 2025https://github.com/microsoftgraph/msgraph-sdk-python/issues/1340#issue-3395730362
https://private-user-images.githubusercontent.com/115926250/486962893-13a8e144-e0ca-4ba1-986a-91d6e7543bb4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg4ODg4OTQsIm5iZiI6MTc2ODg4ODU5NCwicGF0aCI6Ii8xMTU5MjYyNTAvNDg2OTYyODkzLTEzYThlMTQ0LWUwY2EtNGJhMS05ODZhLTkxZDZlNzU0M2JiNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyMFQwNTU2MzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMDdjZWNmOTg0N2I5Nzk3MTMxNDI3ZDI1ZWVlY2RiYjZhOTUwZTUwODNjOWJlOWI4MmVmOTY1YmU4ODU2NzM4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.TkPaX6SV--1-CmmTjUUOq9gXs9FAZ5qECQnwhwyy5BA
https://private-user-images.githubusercontent.com/115926250/486963276-185229b7-7e7b-41f9-ad2c-3bf03778cd56.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg4ODg4OTQsIm5iZiI6MTc2ODg4ODU5NCwicGF0aCI6Ii8xMTU5MjYyNTAvNDg2OTYzMjc2LTE4NTIyOWI3LTdlN2ItNDFmOS1hZDJjLTNiZjAzNzc4Y2Q1Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyMFQwNTU2MzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zODg0NTA0ZDE5MjY5ZTA1YWFiYjVjYjk5MTgzYTc4OTUzMjU5ZTM5MjM5NDlmNzMzMTRkOTE0OTlkZDhjMmQzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.HRMedC2vt3lQ1-GxZSGsaSAHu8qqO1Y7bFKzIYF4kq8
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-python/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.