Hi Everyone, I'm having an issue with dates in my flow.
I am referencing a date in an excel spreadsheet that is populated from a form. As it's populated from a form it pulls date and time.
My flow looks for a date in a spreadsheet and if it is 21 days or older it deletes a row. I have 3 compose functions as follows;
Compose 1 - 'Date completed' taken from spreadsheet
Compose 2 - addDays('1899-12-30',int(outputs('Compose')),'yyyy-MM-dd')
Compose 3 - formatDateTime(addDays(utcNow(), -21),'yyyy-MM-dd')
Compose 2 is failing as compose 1 is pulling 44174.389537037 instead of just 44174 for example.
without manually updating the date in the spreadsheet I can't get it to just pull date and I can't find a setting in the forms to only record date, not time.
Can you help?
Solved! Go to Solution.
@beanybone Yep.. That was I had suggested.. My Variable was timeround yours is Compose output which hold the date variable 🙂
int(first(split(string(<Date Completed>)),'.')))
I am glad that the problem has resolved.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hey MAte @beanybone
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
hey, thanks. where in my flow do I add this compose?
Hello @beanybone
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Sorry you lost me, this is how my flow is set up, when I try to insert the above I just get errors
Hey @beanybone
Try to replace the action in screenshot below with
int(first(split(string(<Date Completed>)),'.')))
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Afraid not, I get an error to say the expression is invalid.
OK!! What is the error? What the Datatype returned by your Date Completed?
Perhaps it returns a number, you can use the Format number action to Format any number.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
I don't get that far it won't let me enter the expression, when I type it in and press ok, it pops up that the expression is invalid?
I managed to figure it out, it might be a little clunky but ...
instead of replacing the initial 'date completed' compose as you suggested, I added another with the following
int(first(split(string(outputs('Compose')),'.')))
and seems to have done the trick!
@beanybone Yep.. That was I had suggested.. My Variable was timeround yours is Compose output which hold the date variable 🙂
int(first(split(string(<Date Completed>)),'.')))
I am glad that the problem has resolved.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |
User | Count |
---|---|
49 | |
29 | |
24 | |
24 | |
20 |