Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function MakeOrchardDateNotStupid (ByVal strDate As String) As String
- return DateTime.ParseExact ("dd-MMM-yyyy", strDate).ToString ("dd/mm/yyyy")
- End Function
- Function MakeOrchardDate(ByVal strDate As String) As String
- Dim strMonth As String
- 'input strDate format dd-mmmm-yyyy
- ' output format
- strMonth = UCase(Mid(strDate, 4, 3))
- Select Case strMonth
- Case "JAN"
- strMonth = "01"
- Case "FEB"
- strMonth = "02"
- Case "MAR"
- strMonth = "03"
- Case "APR"
- strMonth = "04"
- Case "MAY"
- strMonth = "05"
- Case "JUN"
- strMonth = "06"
- Case "JUL"
- strMonth = "07"
- Case "AUG"
- strMonth = "08"
- Case "SEP"
- strMonth = "09"
- Case "OCT"
- strMonth = "10"
- Case "NOV"
- strMonth = "11"
- Case "DEC"
- strMonth = "12"
- Case Else
- 'strMonth = ""
- End Select
- MakeOrchardDate = Mid(strDate, 1, 2) & "/" & strMonth & "/" & Mid(strDate, 8, 4)
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement