| Dart Home | PowerTCP FTP for ActiveX | Custom Development | Reply | PowerTCP FTP for ActiveX Topics | Forums |
| Author | Forum: PowerTCP FTP for ActiveX Topic: VB6 FTP TimeStamp Current Year Format Workaround |
Jon Belanger![]() From: Rome, NY USA Posts: 310 Member Since: 06/10/02 |
posted August 5, 2002 12:47 PM Private Function FormatDate(ByVal RawData As String) As String On Error GoTo Error1 Dim Parts() As String Dim y As String Parts = Split(Replace(RawData, " ", " "), " ") If InStr(Parts(0), "-") Then ' for DOS Listing FormatDate = Format(CDate(Parts(0) & " " & Parts(1)), "M/d/yyyy h:mm AMPM") Exit Function ElseIf InStr(Parts(2), ":") Then y = Year(Now) Else y = Parts(2) Parts(2) = "12:00" End If FormatDate = Format(CDate(Parts(0) & " " & Parts(1) & " " & y & " " & Parts(2)), "M/d/yyyy h:mm AMPM") Exit Function Error1: FormatDate = Format(Now, "M/d/yyyy h:mm AMPM") End Function |
| Reply | PowerTCP FTP for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|