Fecha actual Estimated reading: 1 minute 538 views DESCRIPCIÓN:Guarda en ValorProcesado la fecha actual del sistema, el formato dependerá de lo indicado en Factor.Valores posibles de Factor:Año: Devuelve el año actualFechaCorta: Devuelve la fecha actual con el siguiente formato 03/12/2022FechaHora: Devuelve la fecha actual con el siguiente formato 03/12/2022 11:30:33Hora: Devuelve la hora actual con el siguiente formato 11:30:33FechaFormato: Devuelve la fecha actual con el siguiente formato “yyyy-MM-dd HH:mm:ss”FechaCorta1: Devuelve la fecha actual con el siguiente formato “yyyy-MM-dd”ValorProcesado = CDate(ValorOrigen).ToShortTimeStringFechaLarga: Devuelve la fecha actual con el siguiente formato 03/12/2022 11:30:33EJEMPLO:Valor origen: “03/12/2022”Factor: “FechaFormato”Valor Procesado: “03-12-2022” Tipo Valor Valor Valor2 Relacion Relacion2 Operacion FechaActual Factor FechaLarga Select Case Factor Case “Año” ValorProcesado = CDate(Now).Year Case “FechaCorta” ValorProcesado = CDate(Now).ToShortDateString Case “FechaHora” ValorProcesado = CDate(Now) Case “Hora” Dim currentTime As Date currentTime = TimeOfDay ValorProcesado = currentTime Case “FechaFormato” ValorProcesado = Format(Now, “yyyy-MM-dd HH:mm:ss”) Case “FechaCorta1” ValorProcesado = Format(Now, “yyyy-MM-dd”) Case “FechaLarga” ValorProcesado = Convert.ToDateTime(Now).ToString End Select