Skip to content

Question: How to create a SQL Server GUID (v8) with a specific timestamp? #32

@ShayMusachanov-dev

Description

@ShayMusachanov-dev

Hi,

First off, this library is incredibly helpful. We nearly made a big mistake by trying to use the built-in Guid.CreateVersion7() with SQL Server. Your library exactly addressed the key byte-sorting differences in uniqueidentifier. Thanks to it, we avoided a major headache, and we truly appreciate the effort you've put into this!

I have a question regarding creating UUIDs for SQL Server. I'm trying to generate a SQL Server-compatible GUID (v8) using a specific, known timestamp for our use case.

I've been looking through the documentation, and I can see:

public static Guid CreateUuidV7FromSpecificDate(DateTimeOffset date)

I can't find an equivalent method for creating a SQL Server-compatible v8 GUID from a specific DateTimeOffset.

Am I missing something, or is there another way to achieve this with the existing methods? If not, would this be a feature request? A method like CreateUuidV8FromSpecificDate(DateTimeOffset) would be beneficial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions