Python Forum
Date format conversion "/Date(158889600000)/"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date format conversion "/Date(158889600000)/"
#1
From a JSON file, I'm getting this type of date "/Date(158889600000)/" and I would like to convert this string to a date type.
Does anyone know how I can do that?
Reply
#2
Not really. I mean, it's not clear what date that is. Even knowing what date it is might not be enough. A common way to store a date or time is as a number of time units (days or seconds, usually) since a particular point in time. But that starting point in time can be different depending on what system generated the number. I would look back to where you got the JSON data from, and see if they describe how the date is defined.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
That number is greater than that emitted by timt.time
I suspect it is formatted in some way. Need more information.
can you post the code, or point to where it can be looked at?
There's just not enough information here.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare current date on calendar with date format file name Fioravanti 1 229 Mar-26-2024, 08:23 AM
Last Post: Pedroski55
  Date Time Series Help...Please spra8560 2 366 Feb-01-2024, 01:38 PM
Last Post: spra8560
  Create dual folder on different path/drive based on the date agmoraojr 2 444 Jan-21-2024, 10:02 AM
Last Post: snippsat
  Python date format changes to date & time 1418 4 605 Jan-20-2024, 04:45 AM
Last Post: 1418
  Downloading time zone aware files, getting wrong files(by date))s tester_V 9 1,033 Jul-23-2023, 08:32 AM
Last Post: deanhystad
  Formatting a date time string read from a csv file DosAtPython 5 1,281 Jun-19-2023, 02:12 PM
Last Post: DosAtPython
  PDF properties doesn't show created or modified date Pedroski55 4 1,088 Jun-19-2023, 08:09 AM
Last Post: Pedroski55
  How should I run pip-date in python3? newbieAuggie2019 5 1,858 Mar-31-2023, 03:21 PM
Last Post: snippsat
  How to see the date of installation of python modules. newbieAuggie2019 4 1,603 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  Review my code: convert a HTTP date header to a datetime object stevendaprano 1 1,998 Dec-17-2022, 12:24 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020