Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 2806 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

  • Newbies
Posted (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!

 

Schermata 2017-05-13 alle 15.13.29.png

Edited by valentinomolino
Posted (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 by comment
Posted
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
Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.