About us
ProcessMaker Inc. is the developer of the ProcessMaker Workflow & BPM Software Suite. Read more
if (isset(@@fecha1) and !empty(@@fecha1) and isset(@@fecha2) and !empty(@@fecha2)) {
$fecha1 = strtotime(@@fecha1);
$fecha2 = strtotime(@@fecha2);
$dias = ($fecha2 - $fecha1) / (24*60*60);
$sql = "INSERT INTO PMT_MITABLA (CAMPOX, CAMPOY, CAMPO_DIAS) VALUES ('A', 'B', $dias)";
executeQuery($sql);
}
$dias = round($dias);
if (isset(@@fecha1) and !empty(@@fecha1) and isset(@@fecha2) and !empty(@@fecha2)) {
$fecha1 = strtotime( substr(@@fecha1, 0, 10) );
$fecha2 = strtotime( substr(@@fecha2, 0, 10) );
$dias = (int) (($fecha2 - $fecha1) / (24*60*60));
$hoy = strtotime(date("Y-m-d"));
$anoNuevo = strtotime(date("Y-01-01"));
$diasDiferencia = ($hoy - $anoNuevo) / (24*60*60);
//Resta entre fechas sin contar sab y dom
function cuentaFindes(){
var inicio = new Date(datDisVac); //Fecha inicial
var fin = new Date(datHasta); //Fecha final
var timeDiff = Math.abs(fin.getTime() - inicio.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); //Días entre las dos fechas
var cuentaFinde = 0; //Número de Sábados y Domingos
var array = new Array(diffDays);
for (var i=0; i < diffDays; i++)
{
//0 => Domingo - 6 => Sábado
if (inicio.getDay() == 1 || inicio.getDay() == 5) {
cuentaFinde++;
}
inicio.setDate(inicio.getDate() + 1);
}
return cuentaFinde;
}
function number_of_working_days($startDate, $endDate) {
$workingDays = 0;
$startTimestamp = strtotime($startDate);
$endTimestamp = strtotime($endDate);
for ($i = $startTimestamp; $i <= $endTimestamp; $i = $i + (60 * 60 * 24)) {
if (date("N", $i) <= 5) $workingDays = $workingDays + 1;
}
return $workingDays;
}
Are you looking for a more intelligent approach to[…]
The 1Win Clone Script is a pre-built solution that[…]
Aviator Clone Script replicates the renowned Aviat[…]
From converting physical assets into digital asset[…]