Modify

Opened 15 years ago

Closed 15 years ago

#1783 closed Bug (Duplicate)

_Date_Time_FileTimeToStr with parm 1 error

Reported by: thesnoW Owned by: Gary
Milestone: Component: Standard UDFs
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

; |[0] - Month
; |[1] - Day
; |[2] - Year
; |[3] - Hour
; |[4] - Minutes
; |[5] - Seconds
; |[6] - Milliseconds
; |[7] - Day of week

Func _Date_Time_FileTimeToStr(ByRef $tFileTime, $bFmt = 0)

Local $aDate = _Date_Time_FileTimeToArray($tFileTime)
If @error Then Return SetError(@error, @extended, "")

If $bFmt Then

Return StringFormat("%04d/%02d/%02d %02d:%02d:%02d", $aDate[2], $aDate[1], $aDate[0], $aDate[3], $aDate[4], $aDate[5])

Else

Return StringFormat("%02d/%02d/%04d %02d:%02d:%02d", $aDate[0], $aDate[1], $aDate[2], $aDate[3], $aDate[4], $aDate[5])

EndIf

EndFunc ;==>_Date_Time_FileTimeToStr

;--------------------------------------------

Func _Date_Time_FileTimeToStr(ByRef $tFileTime, $bFmt = 0)

Local $aDate = _Date_Time_FileTimeToArray($tFileTime)
If @error Then Return SetError(@error, @extended, "")

If $bFmt Then

Return StringFormat("%04d/%02d/%02d %02d:%02d:%02d", $aDate[2], $aDate[0], $aDate[1], $aDate[3], $aDate[4], $aDate[5])

Else

Return StringFormat("%02d/%02d/%04d %02d:%02d:%02d", $aDate[0], $aDate[1], $aDate[2], $aDate[3], $aDate[4], $aDate[5])

EndIf

EndFunc ;==>_Date_Time_FileTimeToStr

Attachments (0)

Change History (1)

comment:1 by J-Paul Mesnage, 15 years ago

Resolution: Duplicate
Status: newclosed

duplicate of #1509

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.