Newbies valentinomolino Posted May 13, 2017 Newbies Posted May 13, 2017 Hi forum, I'm struggling with a time field. I'm importing a CSV file that contains a field (it is a text field at the moment) with a duration value in decimals, followed by a letter "m" (i.e. "1.5m", that is for 1 minute and 30 seconds). I'm not being able to let that field shows the value in a mm'ss" format, as I would. Do you have any ideas? Thanks!
comment Posted May 13, 2017 Posted May 13, 2017 Is this a one-time import, or do you need to do this periodically?
Newbies valentinomolino Posted May 13, 2017 Author Newbies Posted May 13, 2017 (edited) 13 minutes ago, comment said: Is this a one-time import, or do you need to do this periodically? everyday, I have to import a csv file in a format I've created. This csv file, contains several different records, each one referring to an audio file, with timecode start and duration. a sort of report of daily activity and it includes that kind of duration field. I attach a picture to explain better. Thanks! Edited May 13, 2017 by valentinomolino
comment Posted May 13, 2017 Posted May 13, 2017 (edited) I would import the value into a text field, then use the importing script to populate the real Duration field (whose type is Time) with a calculated value = 60 * ImportedText You could also set the Duration field to auto-enter this calculation (if your import performs auto-enters). Or just make it a calculation field (result is Time), if you don't need to modify it. Another option is to import directly into the Duration field, then replace the field's contents with a calculation = GetAsTime ( 60 * Filter ( YourTable::Duration ; ".0123456789" ) ) but that's a little flimsy, IMHO. Edited May 13, 2017 by comment
Newbies valentinomolino Posted May 13, 2017 Author Newbies Posted May 13, 2017 I guess I'm not being able to let it work, still thinking what I'm doing wrong...
comment Posted May 13, 2017 Posted May 13, 2017 1 hour ago, valentinomolino said: I guess I'm not being able to let it work, still thinking what I'm doing wrong... I am afraid you're not being clear.
Newbies valentinomolino Posted May 14, 2017 Author Newbies Posted May 14, 2017 Yes, I think I was not very clear but now I understood my error and was able to solve my problem. I had to modify slightly your suggestion but it was really helpful, thank you very much!
Recommended Posts
This topic is 2806 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now