Jump to content
UBot Underground

$Date Add Days Syntax


Recommended Posts

Hello,

 

I would like to know how to substract days from a specific date.

 

I saw this function that will add 7 days to my date

 

set(#d1,$plugin function("File Management.dll", "$date add days", #datedujour, "7"),"Global")

 

I would like to substract 7 days from a specific date, is it possible with ubot?

 

If not, Is there any free plugin to do it.

 

Thanks and Regards

Link to post
Share on other sites

If you wanted to do it from today then:

set(#dateAWeekAgo,$n ago($n seconds(7,"Days")),"Global")

Otherwise, try the datettime manipulation plugin. Then convert your date to unix time, subtract 604800 from it (number of seconds in a week) then convert that from unix time to a date.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...