****************************************************************** * ---- Server DateTime ----- Fecha y Hora del Servidor * ---- Espartaco Palma Martinez esparta@NO_SPAMportalfox.com * ---- FUNCTION: ServerTime * ---- RETURNS: Server DateTime, NULL if cannot get DateTime * ---- RETORNA: Fecha y Hora Server, NULL si no puede obtenerlo * ---- PARAMETERS: tcPath - TYPE: Character * ---- Basandose en las recomendaciones de Alex Feldstein (MS MVP) * ---- sobre como obtener la fecha y hora del servidor. * ---- DATE: 03/DIC/2002 For Use in Visual FoxPro. * ---- Sample: * ---- ltFecha = FechaHora("F:\") * ---- ltFecha = FechaHora("\\SERVER\VALUACION\") * ---- NOTE: If you are using minor versions of VFP7, use FoxTools * ---- NOTA: Si esta usando versiones menores a VFP7, use FoxTools ****************************************************************** FUNCTION ServerTime (tcPath) LOCAL ltFileTime tcPath = IIF(TYPE('tcPath') # 'C', SPACE(0),ADDBS(tcPath)) lcFile = tcPath+SUBSTR(SYS(2015), 4) +".tmp" IF STRTOFILE("Getting Hour/Obteniendo la Hora",lcFile) > 0 ltFileTime = FDATE(lcFile,1) ERASE (lcFile) RETURN ltFileTime ENDIF RETURN NULL