#38716 - 2003-04-03 09:00 PM
Re: NAV Def files and Dates
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11625
Loc: CA
|
Not sure I agree with your date logic for OLDER/NEWER files.
Here is another method of getting the date - Not very clean, but works. I'm sure Jens or Lonkero can GOLF it.
$CurDefDate = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\SharedDefs","NAVCORP_70") $CurDefDate=right($CurDefDate,12) $CurDefDate=left($CurDefDate,8) $FileYear = VAL(RTRIM (SubStr($CurDefDate, 1, 4))) $FileMonth = VAL(RTRIM (SubStr($CurDefDate, 5, 2))) $FileDay = VAL(RTRIM (SubStr($CurDefDate, 7, 2))) $DefDates = "$FileYear$FileMonth$FileDay" $FileDate = VAL(SubStr($DefDates,1,8)) $NowYear = @YEAR $NowMonth = @MONTHNO $NowDate = @MDAYNO If $FileYear <> $NowYear $NowMonth = $NowMonth + (12 * ($NowYear - $FileYear)) EndIf
If $FileMonth <> $NowMonth $NowDate = $NowDate + 30 EndIf If ($NowDate - $FileDate) > 10 ? "File older than 2 weeks" Else ? "File newer than 2 weeks" ENDIF ? $FileDate
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2366 anonymous users online.
|
|
|