Last active
November 23, 2022 18:08
-
-
Save gjuliane/f1ccbf89f7f8395e1f286e2adc9b3752 to your computer and use it in GitHub Desktop.
Postman variable types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Parsear una cadena a fecha | |
pm.globals.set("fProceso", Date.parse(new Date("2022-10-10 00:00:00"))); | |
Test | |
# Contar número de items | |
var body = JSON.parse(responseBody); | |
tests["Count: " + body.length] = true; | |
Generar Java Date desde JavaScript | |
var d = new Date(); | |
var n = d.toISOString(); | |
console.log(n); | |
pm.globals.set("DateNow", n); | |
Fecha personalizada | |
var d = new Date("2022-10-01 00:00"); | |
var n = d.toISOString(); | |
pm.globals.set("DateNow", n); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment