Discussions

 View Only
  • 1.  Transforming Datetime to Time in Pipelines

    Posted 04-01-2023 20:56

    I'm trying to look to set separate date and time fields on a Create Record QB Action in pipelines to be 12 hours from the time the pipeline runs. 

    Setting the date field with {{time.now + time.delta(hours=12)}} gives me a full date and time response, which Quickbase will populate the field.  However the same value in the time field gives an error.  

    To give just the value of time it seems that it should be this {{time.now + time.delta(hours=12)|datetimeformat('%H:%M:%S %Z')}}, but QB will not let me save that.

    Unfortunately I cannot alter the field types to make a single date time field.  

    Any ideas on how I can do this without just adding fields to my table?



    ------------------------------
    Sean Boat-Moore
    Manager SMB Development
    Project Management Office and Quality Control
    NCR Corporation
    sean.boat-moore@ncr.com | ncr.com
    ------------------------------


  • 2.  RE: Transforming Datetime to Time in Pipelines

    Posted 04-05-2023 16:43

    A "Time Of Day" field type accepts HH:MM:SS AM/PM, so specifying the timezone is probably causing the error.  This should work:
    {{ "{:%H:%M:%S %p}".format(time.now + time.delta(hours=12)) }}



    ------------------------------
    Doug Henning
    ------------------------------



  • 3.  RE: Transforming Datetime to Time in Pipelines

    Posted 04-06-2023 23:01

    That worked perfectly.  Thanks so much !!



    ------------------------------
    Sean Boat-Moore
    Manager SMB Development
    Project Management Office and Quality Control
    NCR Corporation
    sean.boat-moore@ncr.com | ncr.com
    ------------------------------