Mark Leung Posted June 11, 2019 Share Posted June 11, 2019 Dear BW expert, We would like to get yesterday date from current date. How to write xpath expression with format-dateTime function to get the yesterday date Please advise! Thanks! Link to comment Share on other sites More sharing options...
Francisco Crespo 4 Posted June 11, 2019 Share Posted June 11, 2019 Hi, To find yesterdays dateTime use the expression: tib:add-to-dateTime(current-dateTime(), 0, 0, -1, 0, 0, 0) and use that as the dateTime value in format Datetime. In short, your expression should look similar to: tib:format-dateTime('MMM dd YYYY - HH:mm:ss', tib:add-to-dateTime(current-dateTime(), 0, 0, -1, 0, 0, 0)) If you are only interested in the date part, use tib:format-date('MMM dd YYYY', tib:add-to-date(current-date(), 0, 0, -1)) Regards, Francisco Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now