Export Attributes - data is converted into date

Started by airpic, December 05, 2021, 04:14:37 PM

Previous topic - Next topic

airpic

Hello Mario

I use attributes quite alot and sometimes I do want to export them either as a CSV file or in the XML format. This generally works fine.

There is one attribute I named "Code" which is set as text. Sometimes the information in this field is like a date, e.g. "06-20" (wihtout the hyphens). In this case, the exported XML file will show this information as "Jun 20". How can this be prevented?

Kindest Regards,
Christoph

Mario

#1
You export Attributes to XML how?
And where do you look at the data afterwards? Notepad? A text editor? Or maybe in Excel?
If you use Excel, make sure that Excel interprets the column contents as text and does not automatically detect it as a partial date. This is one of these Excel automatisms which sometimes get into the way.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

airpic

Hello Mario

I am using the text-export function provided by IMatch (see attached screenshot).

The data is looked at through notepad++ (not excel).

Regards,
Christoph


Mario

#3
How could that work?
The Text Exporter does not interpret the data, it's only text. Whatever the variable returns is sanitized (e.g. taking care of data containing < > or &) and then written to the file.
When I import a file with data setup like yours



the XML looks like:



Anything I did different than you?
What output do you get when you copy&paste your variables into the VarToy?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

airpic

Hello Mario

I just re-entered the data of some records and now they all show as expected. I will now have to check the remaining data for other glitches.

Thank you very much for your help.

Kindest Regards,
Christoph