Skip to content

[Feature] support unix_timestamp() with microseconds #24382

Closed

Description

@zclllyybb

Search before asking

  • I had searched in the issues and found no similar issues.

Description

mysql:

select unix_timestamp(cast('2020-12-12 12:12:12.123' as datetime(3)));


unix_timestamp(cast('2020-12-12 12:12:12.123' as datetime(3)))
--
1607746332.123

ours:

mysql> select unix_timestamp(cast('2020-12-12 12:12:12.123' as datetimev2(3)));
+------------+
| 1607746332 |
+------------+
| 1607746332 |
+------------+
1 row in set (0.10 sec)

so we need a new version of unix_timestamp which could calculate the microseconds.

Use case

No response

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind/feature
    on Sep 14, 2023
  2. YangWithU commented on Sep 14, 2023

    @YangWithU
    Contributor

    Hello, I'd like to take the issue

  3. zclllyybb commented on Sep 14, 2023

    @zclllyybb
    ContributorAuthor

    Hello, I'd like to take the issue

    sure, please add my wechat torch-wood_

  4. zhbdesign commented on Sep 14, 2023

    @zhbdesign

    支持13位毫秒是不是更好

  5. zclllyybb commented on Sep 15, 2023

    @zclllyybb
    ContributorAuthor

    支持13位毫秒是不是更好

    we should be compatible with mysql first. the timestamp with 13-digit is also considerable then.

  6. 435qb commented on Oct 7, 2023

    @435qb

    Can I work on this?

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

Metadata

Metadata

Assignees

Labels

good first issuekind/feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions