Jump to content

{clipboard} as {datetime}


Recommended Posts

I'm building a workflow that supports an overall time-tracking function. The starting point is to capture the {datetime} in an ISO 8601 format - I want to manipulate the {datetime} in various ways later in the workflow, so I'm capturing it to the {clipboard}. 

 

I've tried to call up the {clipboard} entry and take action on it (i.e., modify the output of the date and time like I would with an actual {datetime} entry - {time {clipboard}:HH:mm}), but it returns a hot mess of the clipboard contents mixed up with the text of my attempted query.

 

How can I convert the {clipboard} back to a {datetime} so that I can manipulate the format of the original date and time? 

Edited by jrgarrigues
Link to comment

Apologies - I am rambling a bit because I don't know what I'm asking. 

 

The starting time is the key to my workflow. At the beginning of an appointment, I capture the {datetime} in the standard ISO 8601 format, e.g.,

 

2020-09-06T18:02:17-07:00

 

Because every other action in my workflow will be a response to this time, I am trying to capture it in the {clipboard} where I can later retrieve it and perform more actions on it (e.g., later in the workflow I will know the duration of the appointment in minutes so I can use {datetime/date/or time} to add the minutes for a resultant end date). However, when I call it back up as a {clipboard} item later on in the workflow, I found that I couldn't manipulate it as a {datetime} object - so, I couldn't use the original ISO 8601 format to do things like add an hour and ten minutes to come up with an end time for said appointment.

 

Update: I figured out how to do this using the clipboard:

 

{date +20m {query}:HH:mm}

 

In case it helps anybody else: 

The workflow looks like this: 

1-workflow.png.65a42cf7e4babbb9d1916bec338d455d.png

 

There's nothing spectacular about the Keyword, but I did have to select "Argument Optional" on the right side of the top line:

2-keyword.png.ce384b0b5fca1dcf616266d286c9e7d4.png

 

I identified the argument (in the top section, next to {query}) in order to enter additional time. Also went ahead and made a couple variables because I know I'm going there, but they're not necessary for the initial transformation (the "duration" variable is necessary to check my work, but I probably won't use it for my final workflow) :

3-arg_var.png.0dfab5c13274dfc7bcae714625a85e7b.png

 

Finally, the clipboard section where I formatted the {datetime} component:

4-clipboard.png.16a2c5aec7cb0b94a61169e01ab167dd.png

 

...and a large type display to check the work (note the "duration" variable that I'm using to alter the time so I know it's applying correctly) :

5-large_type.png.21e850acd7d5711a3eace4ee9672cb1b.png

 

Now I'll start messing with variables because I'm going to want to keep the original time longer than would be feasible for clipboard use. 

Edited by jrgarrigues
Link to comment
1 hour ago, jrgarrigues said:

I am trying to capture it in the {clipboard} where I can later retrieve it and perform more actions

 

Don’t use the clipboard for that. You have {query} and variables for that.

 

Two things: Describe what you’re trying to achieve (i.e. the end result), not the way you’re trying to achieve it.

 

Also, please don't post screenshots of your workflow. Instead, upload your workflow somewhere (Dropbox?) and post a link, so I can have a proper look.

Edited by deanishe
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...