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.

TimeToText Calculation?

Featured Replies

  • Newbies

I am using a Calculation field to incorporate time fields and text, in order to create a daily e-mail. The field displays time as 00:00:00, and I only require hour and minute accuracy. Is there a way to change this??

example of script =

"Task Start End Total" &

"p"

"Daily Backup:" & DBackup_Start & DBackup_End & DBackup_Total & ..........

I think you're going to have to parse this manually.

Given a time field the following will convert it to a text field of the format 00:00

Left( TimeField, Position( TimeField, ":", 1, 1) - 1 ) & Middle( TimeField, Position( TimeField, ":", 1, 1) + 1, 2 )

You can integrate this into the rest of your equation and get the results you want.

Chuck

quote:

Originally posted by Chuck:

I think you're going to have to parse this manually.

Given a time field the following will convert it to a text field of the format 00:00

Left( TimeField, Position( TimeField, ":", 1, 1) - 1 ) & Middle( TimeField, Position( TimeField, ":", 1, 1) + 1, 2 )

Left(TimeToText(TimeField), 5) is alot simpler and still results in 00:00

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

quote:

Originally posted by captkurt:

Left(TimeToText(TimeField), 5) is alot simpler and still results in 00:00


Isn't is possible that there isn't a leading zero on the hour portion, in which case a time like 1:11:11 woud return 1:11: (i.e., have the extra colon)? Would this be a problem? I was assuming that I couln't count on a leading zero, and that I didn't want an extra colon. I also figured that a leading zero in the minutes portion would be there, but perhaps that needs to be accounted for too:

Left( TimeField, Position( TimeField, ":", 1, 1) - 1 ) & Middle( TimeField, Position( TimeField, ":", 1, 1) + 1, Position( TimeField, ":", 1, 2 ) - Position( TimeField, ":", 1, 1 ) + 1 )

But perhaps I am making it more complex than it needs to be.

Chuck

[This message has been edited by Chuck (edited October 11, 2000).]

[This message has been edited by Chuck (edited October 11, 2000).]

[This message has been edited by Chuck (edited October 11, 2000).]

[This message has been edited by Chuck (edited October 11, 2000).]

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.