Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    dates

    General Code/Help
    2
    3
    47
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      livecat last edited by

      print(d.datetime.get(0, size=3))

      outputs something like this:

      array('d', [736422.9999999999, 736423.9999999999, 736424.9999999999])

      The part of the number before the decimal point seems to be an ordinal date representation. But i'm not sure about the part after the decimal point.

      How would one convert this back into a datetime?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • vladisld
        vladisld last edited by

        Please take a look at the following post:
        https://community.backtrader.com/topic/2433/transformation-from-datetime-float-to-datetime-type?_=1614783991179

        1 Reply Last reply Reply Quote 2
        • L
          livecat last edited by

          Thanks. Perfect

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors