The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
parse error when changing attribute type from polynomial to date_time [SOLVED]
hello everyone,
while importing a CSV file, RM did automatically set the type of a date-time attribute as a polynomial. The attribute has the following format: JJJJ.mm.dd hh:mmm:ss which is different from the date format of the data we used during RM training "Month day, year time". Changing the attribute type manually does not work and an error message " parsing error" is displayed for all examples of this attribute. Anyone can help?
while importing a CSV file, RM did automatically set the type of a date-time attribute as a polynomial. The attribute has the following format: JJJJ.mm.dd hh:mmm:ss which is different from the date format of the data we used during RM training "Month day, year time". Changing the attribute type manually does not work and an error message " parsing error" is displayed for all examples of this attribute. Anyone can help?
Tagged:
0
Answers
what version of Studio are you using? 7.0 and later have the Date format in the top left corner during the "Format your columns" step while adding data. You can freely change the date format there to whatever you need.
Regards,
Marco
Thank you for your answer, I am using the 7.0 version and already tried all possible data formats in RM but none worked for this type JJJJ.mm.dd hh:mm:ss. What I did now is setting a costum date format in excel for the original data that is compatible with one of the formats in RM ( in this case JJJJ-MM-DD HH:MM:SS which was recognized by RM). It is not that much fun however to do it for 20 columns (especially if I find out during importing data that I have overseen a date column and then have to go back to the original excel data file and change the format there!). Is there a way to fix this directly in RM?
Regards,
Sabrine
yea changing the source data is definetly not the way you want to go ;D
This works for me:
1. Change the Data Format to "yyyy.MM.dd hh:mm:ss"
2. Change the colum type to "date_time"
The test data I used can be found here: https://www.dropbox.com/s/ivrn8o70iie9f71/test.csv?dl=0
Regards,
Marco
you might also simply read it in as nominal and use Nominal To Date afterwards.
~Martin
Dortmund, Germany
Many thanks,
sabrine
Trying to input this date_time: July 13, 2016 05:43 AM
with this date format u provided here: yyyy.MM.dd hh:mm:ss
And I still get parsing errors?
I'm an old school RM user, I don't use the "Add Data" button that much and go straight for the Read CSV or Read Excel operator and use that wizard.
I find it much easier to do as @mschmitz notes, let the date values come in as a polynominals and then convert them with a Nominal to Date operator.
Alright thanks will do that! :smileyvery-happy: