GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add display format for C#/.Net DateTime Ticks · Issue #2378 · sqlitebrowser/sqlitebrowser

Add display format for C#/.Net DateTime Ticks #2378

New issue
Copy link
New issue
Copy link
Closed
Closed
Add display format for C#/.Net DateTime Ticks#2378
Copy link
Assignees
mgrojo
Labels
enhancementFeature requests.Feature requests.
Milestone
3.12.1

Description

@mj2015
mj2015
opened on Aug 19, 2020
Issue body actions

A lot of C#/.Net projects use an integer value of "Ticks" in Sqlite as it is fast for queries. But it ends up with numbers like 637108979310830000 which is less that easy to read as a human than "02/12/2019 15:38:51".

There is "simple" code at CodeGuru that does this conversion. It's years since I did C++ myself, so I'm not too confident making a pull request, but hope that this is simple enough that it could be incorporated.

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

No

Does this feature exist in another product or project? Please provide a link.

There are converters on the web.

Activity

  1. justinclift
    added
    enhancementFeature requests.Feature requests.
    on Aug 19, 2020
  2. justinclift commented on Aug 19, 2020

    @justinclift
    justinclift
    on Aug 19, 2020
    Member
    More actions

    @chrisjlocke Any idea what a "Tick" is here?

    Looking at that code example, it seems related to unix epoch time in some way?

  3. mj2015 commented on Aug 19, 2020

    @mj2015
    mj2015
    on Aug 19, 2020
    Author
    More actions

    Microsoft documentation on tick

    "A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond (see TicksPerMillisecond) and 10 million ticks in a second.
    The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar, which represents MinValue. It does not include the number of ticks that are attributable to leap seconds. If the DateTime object has its Kind property set to Local, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the local time as specified by the current time zone setting. If the DateTime object has its Kind property set to Utc, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the Coordinated Universal Time. If the DateTime object has its Kind property set to Unspecified, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the unknown time zone."

    Reacted by Chris Locke and Justin Clift
  4. justinclift commented on Aug 19, 2020

    @justinclift
    justinclift
    on Aug 19, 2020
    Member
    More actions

    Cool. That should be fairly straight forward. 😄

    Reacted by M Jones
  5. mgrojo
    self-assigned this
    on Aug 19, 2020
  6. mgrojo
    added a commit that references this issue on Aug 19, 2020

    Add .NET DateTime.Ticks to date display format

    b24c1f0
  7. mgrojo commented on Aug 19, 2020

    @mgrojo
    mgrojo
    on Aug 19, 2020
    Member
    More actions

    This display format seems to work:

    datetime("your_column" / 10000000 - 62135596800, 'unixepoch')

    It works for your sample value: 637108979310830000 returns "2019-12-02 15:38:51", so I've added it to the list of predefined display formats. Could you confirm it's working for you in tomorrow's nightly build?

    Reacted by M Jones, Justin Clift and oo-dev17
  8. mgrojo
    added this to the 3.13.0 - Future release milestone on Aug 19, 2020
  9. justinclift
    added
    needs merging with upcoming release branch
    on Aug 19, 2020
  10. justinclift commented on Aug 19, 2020

    @justinclift
    justinclift
    on Aug 19, 2020
    Member
    More actions

    @mgrojo The code change looks simple enough that we could probably cherry-pick it to 3.12.1 too. 😄

    That was a nifty "request -> done" time too. 😁

  11. mj2015 commented on Aug 20, 2020

    @mj2015
    mj2015
    on Aug 20, 2020
    Author
    More actions

    @mgrojo I can confirm it works as it should. Thank you so very much - I think many people will like this! (I should have asked sooner 8-)

    Reacted by Justin Clift
    Reacted by Martin Kleusberg
  12. justinclift
    closed this as completedon Aug 20, 2020
  13. mgrojo
    modified the milestones: 3.13.0 - Future release, 3.12.1 on Aug 22, 2020
  14. mgrojo
    removed
    needs merging with upcoming release branch
    on Aug 22, 2020
  15. mgrojo
    added a commit that references this issue on Aug 22, 2020

    Add .NET DateTime.Ticks to date display format

    fd07543
  16. mj2015 commented on Mar 10, 2021

    @mj2015
    mj2015
    on Mar 10, 2021
    Author
    More actions

    @mgrojo I just updated a system to 3.12.0 and it doesn't have this change. Could you explain why it isn't in? I'd really like this on my Linux boxes. Thanks.

  17. chrisjlocke commented on Mar 10, 2021

    @chrisjlocke
    chrisjlocke
    on Mar 10, 2021
    Member
    More actions

    3.12.0 came out in Jun 2020 - any changes from there would be in the 3.12.1 release (released in Nov 2020). Additionally, any changes would be in the nightlies, or the code which you can compile yourself (creating a 3.12.99 release).

    Hope this makes sense.

  18. mj2015 commented on Mar 10, 2021

    @mj2015
    mj2015
    on Mar 10, 2021
    Author
    More actions

    Ah, thanks. Hmm, why is the Ubuntu package on the download page not up to date then I wonder. I suppose I'll have to work out how that gets updated.

  19. chrisjlocke commented on Mar 10, 2021

    @chrisjlocke
    chrisjlocke
    on Mar 10, 2021
    Member
    More actions

    Aah, there are some 3.12.1 versions in the 'testing' and nightlies area.
    https://launchpad.net/~linuxgndu/+archive/ubuntu/sqlitebrowser-testing

    I'm not sure why an 'official' 3.12.1 version isn't available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mgrojo
    mgrojo

Labels

enhancementFeature requests.Feature requests.

Type

No type

Projects

No projects

    Milestone

    • 3.12.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.