Time Stamp for Start Time

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I want to have a Time Stamp in the Start Time field once I click the +New Log button. What formula should I use?

Here are my fields:

Start Date / Time:

End Date / Time:

Time Spent:

For End Date / Time, I used [Date Created] so it will have a time stamp once I save it. For Time Spent I used [End Date / Time]-[Start Date / Time]. But I don't know what to use in the Start Date / Time so I will have the exact date and time by the time I click +New Log button. Can somebody help me.


Photo of Raymond Marlon

Raymond Marlon

  • 0 Points

Posted 3 years ago

  • 0
  • 1
If you post your current formula for the Add New Log button and tell me the Field ID# for the [Start date / Time] field i can help in more detail, but the built in function 

now()

will return the current date / time and can be used in a URL formula.



I am not understanding the use of the [Date Created] for the "End Time".  That seems counter intuitive.
Photo of Raymond Marlon

Raymond Marlon

  • 124 Points 100 badge 2x thumb
Hi Mark,

The Field ID for Start Date / Time is 6. I'm using [Date Created] for the End Time because I want to get the exact Date and Time when the transaction is saved. The New Log button doesn't have formula it is just a button when you are adding a single record.
Photo of Raymond Marlon

Raymond Marlon

  • 124 Points 100 badge 2x thumb
This is the URL of the table with the New Log Button.
https://emersonclimate-retailsolutions.quickbase.com/db/bkuwc5ru4?a=td
You have given me the URL to the table.  I would need the URL for the Add Record button.
Photo of Raymond Marlon

Raymond Marlon

  • 124 Points 100 badge 2x thumb
This is the URL when I click the New Log Button.
https://emersonclimate-retailsolutions.quickbase.com/db/bkuwc5ru4?a=nwr
You can try this

Urlroot() & "db/" & "bkuwc5ru4" & "?act=API_GenAddRecordForm&_fid_6=" & ToText(now())
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
I'm currently using Formula Date/Time type for the field.
I try to use the formula you gave me but I'm getting an error message when i try to save it.

The error message is:

Formula error
The field is date/time but the formula returns a text result.

Do I need to change anything?
OK, now I understand that you are trying to add a new record from the drop down button at the top of +NEW drop down.  There is not a way to adjust the behavior of that button.

Let's start over.

Your seem to asking how to populate the field called [Start Date / Time:] with the value of the current date / time.

The build in field called [Date Created] will always have the date and time the record was created, so why do you need to populate any fields?  Just use the field [Date Created]
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
I'm using this table to track activities and requests.
I need the Start Date / Time field so I would know the exact date and time when the person click the Add Log button, which is usually the time the request was received.
I need the End Date / Time field so I would know the exact date and time when the person save the entire transaction, which is usually the time the request was completed.

Having both End Date / Time and Start Date / Time, I would be able to get the Time Spent which is the exact duration of the whole transaction.

I don't have any problem with the End Date / Time and Time Spent field.
I just need the Start Date / Time field to have the exact date and time every time I click the +New Log that won't change even if I modify or edit it.
I suggest a simple form rule
When [Start date Time:] is blank
change the value in [Start Date Time:] to the current date / time.

The  current date / time will be one of the drop down choices.
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
I'm using [Date Created] for the End Date / Time field already.

For  example:

Start Date / Time: May 24, 2016 9:38 PM <-- This is where I need your help so I can have a time stamp of the time when you cick +New Log

End Date / Time: May 24, 2016 10:00 PM <-- This is where I use [Date Created]

Time Spent: 00:22 <-- Used [End Date / Time]-[Start Date / Time] to get to duration of entire transaction
right, now I understand what you are trying to do.  use a form rule to populate the [Start Date Time:]
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
How can I do the form rule to populate the Start Date Time? Sorry for asking. I'm just new in QuickBase. :)
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
I want the Stard Date / Time to be an automatic timestamp and not manually entered so the person doing the transaction can't edit the Start Date / Time. So the real time can be recorded.
Use a form rule and then also make the field "read only" in Form Properties. That way users will not be able to edit it manually.
To make a form Rule go to Customize this Form and use the tab for Dynamic Form Rules.  I am assuming that you are not on the Essentials plan and have this feature.  The Essentials plan (the small 10 user plan) does not have this feature.
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
But can the Start Date / Time field be able to capture the current time and date at the moment they click the +New Log button? And will not change once they save it after a minute or so?
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
What do I need to put exactly in the form rule?
Use what a I posted yesterday.

I suggest a simple form rule
When [Start date Time:] is blank
change the value in [Start Date Time:] to the current date / time.
Yes, the date will populate when the form is opened for the first time.
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
I've tried the form rule you've posted.
When I click +New Log button. There is no date and time appearing in the Start Date / Time field. Also nothing is appearing even after I save it.
Can you tell me the form rule?  Note that you do not actually type "blank" in the box.  You just leave it blank.  You can post an image of your form rule by editing your original question, if you like.
Also what field type is the start / date field.  Is it a date / time field type?
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
As seen on the picture attached.
Photo of Raymond Marlon

Raymond Marlon

  • 0 Points
I just leave it blank and the field type is Date / Time