![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How can I store the incremented time value as 4:10 PM OR how can I force the field to display as 4:10 PM in the email? |
#3
| |||
| |||
|
|
maryta... (AT) gmail (DOT) com wrote: How can I store the incremented time value as 4:10 PM OR how can I force the field to display as 4:10 PM in the email? Well, this isn't very intuitive and, in fact, I don't think it's documented anywhere obvious. In fact, up until this moment, I always resorted to complex calculations to get time as formatted text like this. But thanks to your question, I just did something I'd never tried before...and it worked!!! Let's say your origtime is "4:00 pm". This is really stored in FileMaker as the number of seconds since midnight (57600), though you will never see it displayed this way in FileMaker. Instead, the default time display, particularly after being used in a calc, is military time (16:00:00). That's all neither here nor there -- just for sake of your knowing. So let's say you want to add 10 minutes to your origtime. The easiest way is in seconds, or (origtime + 600). Well, I just discovered that you can use the GetAsTime() function to format this as you desire. We can express this in a Let() statement: Let( newtime = origtime + 600; GetAsTime(newtime & " AM") ) You need to always use " AM" (with the space and within quotes). It will automatically convert it to PM if needed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Howard Schlossberg FM Professional Solutions, Inc. Los Angeles FileMaker 8 Certified Developer Member, FileMaker Business Alliance |
#4
| |||
| |||
|
|
On Jul 22, 8:55 pm, Howard Schlossberg how... (AT) nospam (DOT) fmprosolutions.com> wrote: maryta... (AT) gmail (DOT) com wrote: How can I store the incremented time value as 4:10 PM OR how can I force the field to display as 4:10 PM in the email? Well, this isn't very intuitive and, in fact, I don't think it's documented anywhere obvious. In fact, up until this moment, I always resorted to complex calculations to get time as formatted text like this. But thanks to your question, I just did something I'd never tried before...and it worked!!! Let's say your origtime is "4:00 pm". This is really stored in FileMaker as the number of seconds since midnight (57600), though you will never see it displayed this way in FileMaker. Instead, the default time display, particularly after being used in a calc, is military time (16:00:00). That's all neither here nor there -- just for sake of your knowing. So let's say you want to add 10 minutes to your origtime. The easiest way is in seconds, or (origtime + 600). Well, I just discovered that you can use the GetAsTime() function to format this as you desire. We can express this in a Let() statement: Let( newtime = origtime + 600; GetAsTime(newtime & " AM") ) You need to always use " AM" (with the space and within quotes). It will automatically convert it to PM if needed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Howard Schlossberg FM Professional Solutions, Inc. Los Angeles FileMaker 8 Certified Developer Member, FileMaker Business Alliance WOW! Thank you soooooo much! That worked! I certainly would not have thought to add the "AM" part on my own. Mary |
![]() |
| Thread Tools | |
| Display Modes | |
| |