_DayValueToDate
"Stefan Lubitz" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <015401c765bb$bb6c86d0$6500a8c0@bluesbrother> |
Hi all,
I have got a strange problem :-[
I tried to calculate some Dates in the following ways:
This is working:
; Julian date of today.
$sJulDate = _DateToDayValue (@YEAR, @MON, @MDAY)
MsgBox(4096, "", "Todays Julian date is: " & $sJulDate)
; 14 days ago calculation.
Dim $Y, $M, $D
$sJulDate = _DayValueToDate ($sJulDate-14, $Y, $M, $D)
MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y)
This is working also:
$test = "2454429.5"
; 14 days ago calculation.
Dim $Y, $M, $D
$sJulDate = _DayValueToDate ($test-14, $Y, $M, $D)
MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y)
But this is not working, and I don't know why:
$file = FileOpen("c:\kal.txt", 0)
$line = FileReadLine($file)
$string=StringSplit($line,"-")
$blub=$string[1] ;-->$blub results 2454414.5
MsgBox(0,"blub",$blub)
Dim $Y, $M, $D
$sJulDate = _DayValueToDate ($blub, $Y, $M, $D)
MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y)
Regards,
Stefan
Where is the difference between a Variable I write manually (like $test) and
the Variable $blub, which has the same value?????
[Non-text portions of this message have been removed]