{{Now()}} in flows?

Hi,

I’m trying to log (Simple LOG) some text and the current date and time. Using Homey’s own date-variable is not an option as it is formatted in a way I don’t like.

I’ve tried things like {{date.Now()}} but it will only output {{date.Now()}}.

Thanks!

Create a Tag in a Homey script where you can format your time just the way you want.

Don’t forget to explain how to get the local time in Homeyscript :stuck_out_tongue_winking_eye:

1 Like

I am currently creating this in better logic.
Follow the ftp client topic.

The local time issue is already solved in the new BetterLogic sdk3 version.

This is default available in Simple Log, simply press the Calendar and the Clock icon at the top of the page

I needed customisable timestamp tokens for saving (image)files through the ftp client app.
And BL already has functionality for this build in, so i wanted to extend on that.

[APP][Pro] Better logic - Just some better logic and variable management - Apps - Homey Community Forum

Thanks - Yes, I could do that but I’m trying to use scripting to a minimum! :slight_smile:

Thanks, I’m a bit confused. I created a Better Logic (string) variable (MyFormatDate).How do I update it with the “yyyy-mm-dd hh:mm:ss” format?

Hey Pat,

You cannot yet put this datetime into a variable directly.
I’m getting to that, working on it, but implementing it in an awesome takes some time.

What i did is create a flowcard that returns a tag/token.
Just run the card with the format you want (Months are capitol MM) and it will return a token:
image

More coming, but this was the fastest way to implement something and i am sure people will use this card (i will), so i started with this one.
And it’s handy to not need a variable, you can use this card in the scope of the flow.

But, more (ways) coming to manage this into variables.

And to get “yyyy-MM-dd hh:mm:ss”, just type it in the field (and then select it from the top of the list).

1 Like

Or try "d MMM 'yy"
But that’s not what you asked, it’s just cool you can :wink:

Many thanks! Great work! :slight_smile:

1 Like

You’re welcome and thanks!