Forum Discussion

SeanBoat-Moore's avatar
SeanBoat-Moore
Qrew Trainee
2 years ago

Transforming Datetime to Time in Pipelines

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 Replies

  • DougHenning1's avatar
    DougHenning1
    Community Manager

    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
    ------------------------------
    • SeanBoat-Moore's avatar
      SeanBoat-Moore
      Qrew Trainee

      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
      ------------------------------