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 4664 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I need to export text that shows date and time in the format : "yyyy-mm-dd hh:mm:ss" The best formula I have found so far for the calculation field is

"Year ( DateStart ) & "-" & Month ( DateStart ) & "-" & Day ( DateStart )& " " & TimeStart"

However this gives results like ""2012-4-23 10:00:00" which has the problem of the month only having one digit when I need it to have two. Any ideas for resolving this?

I also have the problem that the exported text should have a UNIX LF end of carriage instead of a Macintosh end of line. Can you implement a UNIX LF end of carriage from within FMP?

Posted

Use this expression to add leading zeros...

Right( "00" & Month( DateStart ) ; 2 )

Posted


Let ( [

  Date = YourDate ;

       y = Year ( Date ) ;

      m = Right ( 0 & Month ( Date ) ; 2 ) ;

       d = Right ( 0 & Day ( Date ) ; 2 )

] ;

    y & "-" & m & "-" & d

)

Posted

Great thanks very much to both of you. Any ideas about the LF end of carriage problem ?

Posted

When exporting data (suit the Export script step) there is an option to choose Macintosh or Windows format.

This topic is 4664 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.