Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

date and time format "yyyy-mm-dd hh:mm:ss"

Featured Replies

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?

Use this expression to add leading zeros...

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


Let ( [

  Date = YourDate ;

       y = Year ( Date ) ;

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

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

] ;

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

)

  • Author

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

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.