Hello,
can anyone help me to transfer the dates in my excel to SharePoint , I managed already the process of transferring all other data / columns in my excel file except dates
what expression I should be using in the submission date field
i used in expiry date ( compose connector ) the following
Solved! Go to Solution.
Hi @sherif77
The syntax and function for addDays('1899-12-31',int(item()['Expiry Date']),'YYYY-MM-DD') seem off.
How many days are you trying to add (or subtract) from the date "1899-12-31"?
The functions addDays() takes the # of days as an argument. Your function may not work for a few reasons:
1) the int function will not convert a date with format 'YYYY-MM-DD' to an integer since 'YYYY-MM-DD' is not a valid non-integer number.
2) the argument int(item()['Expiry Date']),'YYYY-MM-DD' is not a valid number (+ or -) therefore the addDays function will not work.
3) Not sure if this is on purpose but 'YYYY-MM-DD' will not return a valid date format. The correct syntax is 'yyyy-MM-dd'
4) You need a formatDateTime in your function if you explicitly want to set a date format.
Some tips.
To explicitly format your expiry date then use the syntax below
dayOfMonth(formatDateTime(utcNow(),'yyyy-MM-dd')) = 19th day of the month
If you want to get a specific number of days forward or backward from '1899-12-31' then use this syntax. Use the dayOfMonth function to get a valid day.
addDays('1899-12-31',dayOfMonth(formatDateTime(utcNow(),'yyyy-MM-dd')) = 1900-01-19T00:00:00.0000000
Cheers,
Aman
------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------
Hi @sherif77,
The expression addDays('1899-12-31', int(item()['Expiry Date']),'YYYY-MM-DD') couldn't work, I guess it is caused by the second parameter, the second parameter should be a valid integer. More details, you could refer to: addDays() function .
If you could share the output of "item()['Expiry Date']", error details, and screenshots of the previous action, they could help us assist you better.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sherif77
The syntax and function for addDays('1899-12-31',int(item()['Expiry Date']),'YYYY-MM-DD') seem off.
How many days are you trying to add (or subtract) from the date "1899-12-31"?
The functions addDays() takes the # of days as an argument. Your function may not work for a few reasons:
1) the int function will not convert a date with format 'YYYY-MM-DD' to an integer since 'YYYY-MM-DD' is not a valid non-integer number.
2) the argument int(item()['Expiry Date']),'YYYY-MM-DD' is not a valid number (+ or -) therefore the addDays function will not work.
3) Not sure if this is on purpose but 'YYYY-MM-DD' will not return a valid date format. The correct syntax is 'yyyy-MM-dd'
4) You need a formatDateTime in your function if you explicitly want to set a date format.
Some tips.
To explicitly format your expiry date then use the syntax below
dayOfMonth(formatDateTime(utcNow(),'yyyy-MM-dd')) = 19th day of the month
If you want to get a specific number of days forward or backward from '1899-12-31' then use this syntax. Use the dayOfMonth function to get a valid day.
addDays('1899-12-31',dayOfMonth(formatDateTime(utcNow(),'yyyy-MM-dd')) = 1900-01-19T00:00:00.0000000
Cheers,
Aman
------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------
Join digitally, March 2โ4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
80 | |
55 | |
55 | |
43 | |
39 |
User | Count |
---|---|
83 | |
81 | |
76 | |
64 | |
42 |