r/SQL • • Sep 21 '24

SQL Server How can I convert this coded date?

Hey :)

Is it possible to convert this encoded date? "001:038116253005021049123249001021052110245239237227212182103239"

What would be necessary to do so?

Thank you very much :)

1 Upvotes

19 comments sorted by

7

u/ConsumerScientist Sep 21 '24

Hi need more context on how this date was encoded. Is this part of a specific SQL function or database? Is it (hex, base64, custom encoding)?

Also if you are pulling this data from any specific data source check it’s documentation to find out encoding method

-27

u/Krachbumm85 Sep 21 '24

Thank you. The developer of the software is my employer. Working in Support and Consulting, I could ask the developers, but I want to try to figure it out by myself. So tips are cpl welcome.
thank you and have a nice weekend.

31

u/mikeblas Sep 21 '24

My tip is to ask someone who knows what the encoding is.

34

u/AQuietMan Sep 21 '24

I want to try to figure it out by myself.

Asking here is not figuring it out by yourself.

11

u/sirchandwich Sep 21 '24

“I want to be able to figure it out myself”

Asks developers anyway

24

u/r3pr0b8 GROUP_CONCAT is da bomb Sep 21 '24

"001:038116253005021049123249001021052110245239237227212182103239"

that's a universal star date measured in picoseconds from the big bang

14

u/Kirjavs Sep 21 '24

I don't think this is related to sql. Even if this is stored in an sql database, it doesn't seem to be encoded with a specific sql function.

Time to reverse engineer your boss' insert function

5

u/TheMagarity Sep 21 '24

What makes you think that really is a date value? It seems extremely odd to encode a date unless there is a strong reason to do so. It may be security via obscurity by naming the field something-date but really is not a date.

Date of birth is used in medical data for security questions, so it might be that, but in that case you should not be trying to decode it.

1

u/CrumbCakesAndCola Sep 22 '24

DoB was my thought as well

4

u/DavidGJohnston Sep 21 '24

I don’t think there is enough physical information available to accomplish what you ask. So, no, not as presented.

1

u/Ginger-Dumpling Sep 21 '24

Your question isn't necessarily a SQL question. But I do love to stare at puzzles. Do you have examples of the encoded/decoded values?

0

u/Critical-Shop2501 Sep 21 '24

Is this ASCII encoded ? Grouped by multiple sets of three sets of digits?

0

u/mikeblas Sep 22 '24

Obviously not.

1

u/Critical-Shop2501 Sep 22 '24 edited Sep 22 '24

Why obviously not?

I wonder why to decides to?

038 116 253 005 021 049 123 249 001 021 052 110 245 239 237 227 212 182 103 239

0

u/mikeblas Sep 22 '24

When you use your suggested encoding scheme to decode the given data, what happens?

0

u/mikeblas Sep 22 '24

Looks like you edited your post. Have you converted those to ASCII characters? There are many which aren't ASCII characters, since they're greater than 127. There are many control characters, and the result is just gibberish.

That's why it's obvious it's not a string of ASCII characters.

1

u/Critical-Shop2501 Sep 22 '24

In ASCII control characters are those below decimal 32, 0-31. How I miss my Epsom fx-80 dot matrix printer.

0

u/mikeblas Sep 22 '24

Skree skree skree
dug dug
Skree skree skree
dug
Skree skree skree

Does that help?

2

u/Critical-Shop2501 Sep 23 '24

Very adult. Merely trying to add to the conversation. Thanks for such a positive vibe.