3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by TsadokBlok
0

Assumming the input for the elbonian date is a textbox1 you can:
a) split the input into 3 parts by "-" as separator
b) Verify that the year has 4 digits including century. this is needed for the next steep
c) Create an string in format of yyyy-MM-dd ( called also universal format), convet it to date-time and convert the result to long date string
d) Put the resulting date in your output control assuming label1
IE:

Dim dateParts as string() = textbox1.Text.Split("-"c)
If dateParts(1).Length = 2 Then dateParts(1) = "20" & dateParts(1)
Dim resultingDate as String = Ctype(dateParts(1) & "-" & dasteParts(2) & "-" & dateParts(0), DateTime).ToLongDateString
label1.Text = resultingDate

Hope this helps

Edited by lolafuertes: n/a

0

You could use formatting options for converting dates and time..

Dim RightNow as Date = Now
Dim result as New System.Text.StringBuilder

'Elbonian
txtBoxElbonianDate.text = result.append("dd/yy/MM")

'Other
txtBoxAmerican.text = result.append("yy/MM/dd")

Edited by TsadokBlok: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.