Discussions

 View Only
  • 1.  Set Current Time?

    Posted 09-13-2022 16:21
    I believe

    Today() is used for the current date.
    Now() is used for the current date and time
    What do you use for ONLY the time? To set the time of day field to the current time?

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: Set Current Time?
    Best Answer

    Posted 09-13-2022 16:23
    ToTimeOfDay(Now())

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



  • 3.  RE: Set Current Time?

    Posted 11 days ago

    Do you know of there is a syntax in formula apis such as:

     "&_fid_7=now" or  "&_fid_7=today"

    Is there the equivalent for time?

    Or would it be:  "&_fid_7=" & URLEncode(ToTimeOfDay(Now()));



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 4.  RE: Set Current Time?

    Posted 11 days ago

    This is valid and he field will be populated with the date/time that the button was clicked.
    "&_fid_7=now"

    This will populate the date/time that the page loaded, so typically better to use the above.
    "&_fid_7=" & ToText(Now())

    This is not valid
    "&_fid_7=today"  it has to be 

    "&_fid_7=" & ToText(Today())



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



  • 5.  RE: Set Current Time?

    Posted 6 days ago

    Meant to tell you Mark - 

    I tested "&_fid_7=today" to fill in a date field, and it worked. I have also used "&_fid_7"= URLEncode(Today()) which worked as well. I am not sure if the first one fills in the date of the button push (which would only matter if it was pushed at 11:59:59.59999pm). 



    ------------------------------
    Mike Tamoush
    ------------------------------