Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Filemaker's internal time storage notation is simply the number of seconds elapsed since midnight of the current day.</p> <p>I.e. 56659 seconds since midnight = 3:44:19 PM.</p> <p>When exporting data, you can check off the "Apply current layout's data formatting to exported data" checkbox, so that times <em>displayed</em> as 24-hour in FMP layouts are <em>exported</em> as such.</p> <p>But, for other internal use such as the file-naming case you're asking about, you will need to use a custom function to convert the output of Get(currentTime) to 24-hour format.</p> <p>For example, see the <a href="http://www.briandunning.com/cf/144" rel="nofollow">TimeFormatAs ( theTime ; type12or24 )</a> function at Briandunning.com. (Full code of the custom function is pasted below for protection against dead links in the future, but if the link above still works, use that version as it may be more up-to-date:)</p> <hr> <pre><code>/*--------------------------------------------------------------- Function Name: TimeFormatAs Syntax: TimeFormatAs ( theTime; type12or24 ) Author - Jonathan Mickelson, Thought Development Corp. (www.thought-dev.com) ---------------------------------------------------------------*/ Case ( not IsEmpty ( theTime ) ; Let ( [ // FIXED VARIABLES padHoursChar = "" ; // Character to pad the Hours with in a text result, (Ex."0", " ", "") padAMPMChar = " " ; // Character to pad the AM/PM with in a text result, (Ex."0", " ", "") suffixAM = "AM" ; // &lt;------------ CHANGE AM Suffix Here suffixPM = "PM" ; // &lt;------------ CHANGE PM Suffix Here // DYN. VARIABLES theTime = GetAsTime ( theTime ) ; hasSeconds = PatternCount ( GetAsText ( theTime ) ; ":" ) = 2 ; secs = Mod ( Seconds ( theTime ) ; 60 ) ; mins = Mod ( Minute ( theTime ) ; 60 ) + Div ( Seconds ( theTime ) ; 60 ) ; hours = Hour ( theTime ) + Div ( Minute ( theTime ) ; 60 ) ; // -------------- BEGIN 24 HOUR TIME CALC ---------------------- result24 = GetAsTime ( theTime ) + 1 - 1 ; // -------------- BEGIN 12 HOUR TIME CALC ---------------------- hours = Mod ( Hour ( theTime ) ; 12 ) ; tempHours = Case ( ( hours &lt; 1 ) or ( hours - 12 = 0 ) ; 12 ; hours ) ; calc12Hours = Left ( padHoursChar &amp; padHoursChar ; 2 - Length ( tempHours ) ) &amp; tempHours ; calc12Minutes = Left ( "00" ; 2 - Length ( mins ) ) &amp; mins ; calc12Seconds = Left ( "00" ; 2 - Length ( secs ) ) &amp; secs ; calc12Suffix = Case ( Mod ( Hour ( theTime ) ; 24 ) &gt;= 12 ; suffixPM ; suffixAM ) ; result12 = calc12Hours &amp; ":" &amp; calc12Minutes &amp; // if original time included a non-zero seconds value, display seconds Case ( hasSeconds and secs &gt; 0 ; ":" &amp; calc12Seconds ) &amp; padAMPMChar &amp; calc12Suffix ] ; Case ( type12or24 &gt;= "24" ; result24 ; result12 ) // END CASE ) // END LET ) // END CASE </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload