Newbies valentinomolino Posted May 13, 2017 Newbies Share 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! Link to comment Share on other sites More sharing options...
comment Posted May 13, 2017 Share Posted May 13, 2017 Is this a one-time import, or do you need to do this periodically? Link to comment Share on other sites More sharing options...
Newbies valentinomolino Posted May 13, 2017 Author Newbies Share 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 Link to comment Share on other sites More sharing options...
comment Posted May 13, 2017 Share 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 Link to comment Share on other sites More sharing options...
Newbies valentinomolino Posted May 13, 2017 Author Newbies Share Posted May 13, 2017 I guess I'm not being able to let it work, still thinking what I'm doing wrong... Link to comment Share on other sites More sharing options...
comment Posted May 13, 2017 Share 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. Link to comment Share on other sites More sharing options...
Newbies valentinomolino Posted May 14, 2017 Author Newbies Share 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! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 2538 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