Hi every one and IĀ“m sorry about my english, itĀ“s horrible, so, I need to take a date from response body, set in a variable but, separate months and years, below I print what I need, and tks for the community.
Hey @hrosani84 Welcome to the community
Iām not quite sure what type of response you are getting, but just to help you get the value of āvalidadeā seperated as date, month and year, you could use the split function.
var response=pm.response.json()
var d_m_y=[] // to store the date, month and year seperately
d_m_y = response.validade.split('\\'+'/');
console.log(d_m_y)
Hope it helps,
Good luck
1 Like
Thks bbahadur, it doesnāt work, bring me all date, what I need is something like this:
var date_month = d_m_y[3ā¦4]
var date_year = d_m_y[6ā¦7]
Set month and year in separate variables