4

I assume when we create a GUID, it encodes a time-stamp.

Is there any way I can find the time stamp from a GUID?

Thanks in advance,

  • Why would you assume this? `SELECT NEWID(), NEWID(), NEWID();` - what makes you think these values have anything at all in common? – Aaron Bertrand Aug 14 '14 at 01:04
  • 2
    Only if you happen to have a [Version 1 GUID](http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_.28MAC_address.29), which is rare nowadays. – Igor Tandetnik Aug 14 '14 at 01:04
  • Only certain types of GUIDs use real timestamps, like version 1 OSF GUIDs. Others are just hardware values (MAC address, etc) mixed with random numbers. See [RFC 4122](http://tools.ietf.org/html/rfc4122) for more details. – Remy Lebeau Aug 14 '14 at 01:07
  • Hi Aaron, my values are not having anything in common. I had a customer issue where some duplicates are created in sql server db. There is no column for "date creation". So I would like to know all these are happened in what period of time. – OrionSoftTechnologiesSydney Aug 14 '14 at 01:09
  • You're not going to be able to tell that from a GUID alone in SQL Server, sorry. – Aaron Bertrand Aug 14 '14 at 01:11

1 Answers1

4

No, while a time stamp may be used, among other sources, as a source of entropy for the generation of an UUID (128-bit Universally Unique Identifier), it is not part of the identifier.

Cheers and hth. - Alf
  • 142,714
  • 15
  • 209
  • 331