Read and Match input with current time

Describe the issue/error/question

I’d like to get the time by reading it from an external course, such as Google Sheet or Airtable. Such as 9:30 for 9:30 AM or 16:30 for 4:30 PM. No issues with this.

Then I’d like to match this with the current time. This is where I am getting stuck. And would appreciate some pointers on how to complete this.

Thanks!

What is the error message (if any)?

Please share the workflow

(I've tried date and time, IF and Function - but clearly, whatever I am doing is not right, so I'd rather ask for the best approach instead of sharing what I have)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hi @sunnym

There is a few things you can do. You can use Luxon

Or the Date time node
Or Standard Java script in expressions

Thank you, @BramKn

I did try to use Date and Time, but in my experience, the Date and Time node doesn’t even have an option for Time. Even if I tried giving it some arbitrary time to convert, the time part always gets reset to zero.

Am I missing something?

Strange, Would have expected that to also give the time on the second one.
first one doesnt have a time so that is logical.

try luxon, that should work for sure.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.