LOINC code is automatically converted into date format data

I have a serious but trivial problem.

I can’t fix the problem that some LOINC codes in Excel are automatically converted to date format.

Is there a way to prevent it from automatically converting to date?

Please let me know how to fix it.

Thank you!!!

Hello and thanks for posting. Microsoft’s “helpful” feature of presuming hyphens mean a short date format has always impacted the first 12 codes created in LOINC. I find if you work from the .csv format and paste special>values, you can retain the twelve codes. Or if it was forgotten, one can sort the list to bring the 12 together, insert an apostrophe before each string and hit return.

2 Likes

Hi Pam

Thank you so much.

I thought those were way above 12 codes…
Now I can fix it.

If you show me the 12 codes, that should be greatly helpful.

Thanks again

HI Pam,

You don’t need to show me the first 12codes.

Finally, I got the solution.
I use that expression
=YEAR(G2)&“-”&MONTH(G2)

Thank you so much!!

1 Like

I always use the Data tab on Excel to import any csv into Excel. This way you can set the data type for each column. It’s a bit more hassle than just opening the csv directly, but it prevents Excel from making incorrect assumptions about data types based on their values. I use the legacy import feature in Excel; I can’t stand the new import feature.

1 Like

Thanks @mitchedo - this is a great tip!