Discussions

 View Only
  • 1.  Time Input forumula

    Posted 02-06-2023 04:21
    For some reason, my users are NOT fans of inputting time values on the mobile app (brings up the pop up with the dailer style window).

    Is there some way that I have have them input say 2 fields (number or text whichever works) as follows...

    Time:
    Am / Pm

    24 Hour time: (this is where I will need help with a formula to calculate the correct time from the two above fields).

    Any help appreciated.

    Cheers,
    Damien

    ------------------------------
    damien page
    ------------------------------


  • 2.  RE: Time Input forumula

    Posted 02-06-2023 07:56
    I totally agree.  Time entry into a free form field is wonderful as the input require is minimal.  Like 
    10 means 10 am
    2p mean 2 pm.  It's quite intuitive.

    Obviously you know what a date field is.

    Then also make a Time of Day field 

    Then make a field to combine then as a formula date time field type.

    ToTimeStamp([my date field], [My Time of day field])



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Time Input forumula

    Posted 02-06-2023 08:16
    Thx Mark...

    I don't need the date field just the time, and some users have difficulties converting say 2pm to 14:00....

    hence why I assumed having a field for the time (like say text or numeric) and for example it might be 2:25 pm then they would put 0225 in the 1st field , then PM in a second field (drop down box) then have a 3rd field convert it to 24hr time field..

    cheers 
    Damien.

    Sent from my iPhone





  • 4.  RE: Time Input forumula

    Posted 02-06-2023 08:54
    OK sorry, I didn't read your question closely enough and missed the aspect of mobile app input.  

    I have not tested but I suggest that you put in a numeric field and a multiple choice field text field and then convert to a time like this.  

    ToTimeOfDay(totext([my numeric field]) & [my AM PM field])

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Time Input forumula

    Posted 02-06-2023 16:44
    Good morning Mark.

    So the 1st field is setup as a numeric , the 2nd field is setup as a text field.

    The final field (formula) is as follows...

    ToTimeOfDay(ToText([TIME ALT 1]) & [TIME ALT 2])

    Not woring, but reporting 'expecting text but found time of day'.

    ------------------------------
    damien page
    ------------------------------



  • 6.  RE: Time Input forumula

    Posted 02-06-2023 17:24
    Change the field type of the formula field to be a Formula Time Of Day field type.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Time Input forumula

    Posted 02-06-2023 17:40
    Good morning Mark....

    Still doesnt seem to work correctly..

    Input time as say 0011 (which equates to 11 past midnight) and that formulates as either 11:00 am or 11:00 pm (incorrect) but most other times do not equate to the field being populated....

    Cheers,

    Damien

    ------------------------------
    damien page
    ------------------------------



  • 8.  RE: Time Input forumula

    Posted 02-07-2023 09:56
    sorry, I forgot about the Minutes issue.

    Try this

    var text MM = Right([Time input],2);
    var text HH = NotRight([Time input],2);

    ToTimeOfDay(List(":", $HH,$MM))

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------