How to format time to duration of time in user input for dataset collection

Sorry @alan33921 ! It was a typo …

$w('#dataset1').setFieldValue({searchBar: result});

Just add the curly braces.

Regarding the second error, you just need to change the function into an async one, I don’t know what function the query is inside of, but generally you need to add the async keyword to the function.

export async function button_onClick(event) {...}

$w('#element').onClick(async(event) => {...})

$w.onReady(async function() => {...})
$w.onReady(async() => {...})

These are examples to give you better understanding.