add +1 day to date
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hello,
im trying to add + 1 day to below system date so should be 5 September 20. I am not particular on the structure of date so long it adds 1 day to the System Date. Have tried using formula using DateTimeAdd(DateTimeParse([SystemDate],"d-mon-%y"),+1,"days") but it return as Null. Many thanks in advance!
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KLS ,
You almost got it right.
DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days")
To know more about the parameter, see here: https://help.alteryx.com/current/designer/datetime-functions
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @KLS ,
Building on @fmvizcaino , if you want as a string and in the same format
DateTimeFormat(DateTimeAdd(DateTimeParse([f],"%d-%b-%y"),+1,"days"),'%d-%b-%y')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@KLS ,
sorry using system date field
DateTimeFormat(DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days"),'%d-%b-%y')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KLS,
Here is the solution:
DateTimeFormat(DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days"),'%d-%b-%y')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @ImadZidan @fmvizcaino can I trouble you guys with last one. From the system date below I want to rename my output file as "FileName" "2020" ie input the year , thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KLS , just replace %y with %Y, like this.
DateTimeFormat(DateTimeAdd(DateTimeParse([SystemDate],"%d-%b-%y"),+1,"days"),'%d-%b-%Y')
and it will work.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @KLS ,
sorry mate I was occupied.
Her is an idea on the file naming.
please pay attention to the options in red. You may not want to override. You may need to output the filepath. It is currently pointing to my local path.
Well, I hope it helps or gives you an idea.