cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert date in ddmmyy format

Former Member
0 Kudos

dear all

i am passling the date like that


  Dim oDelDate As SAPbouiCOM.EditText
oDelDate=oForm.Items.Item("11").Specific.Value
 osubForm.Items.Item("12").Specific.Value = oDelDate.Value

but it passel the date like

20111014

i need to show that

like this

14/10/11

how it possible

plz help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kishor,

Try This.........


                 Dim oedit As SAPbouiCOM.EditText
                 oedit = oform.Items.Item("10").Specific
                Dim for_date As String
                for_date = oedit.Value
                Dim today_date_str As String
                today_date_str = for_date.Substring(6, 2) + "/" + for_date.Substring(4, 2) + "/" + for_date.Substring(0, 4)
                MessageBox.Show(today_date_str)

Thanks

Shafi

Answers (1)

Answers (1)

Former Member
0 Kudos

cdate(oForm.Items.Item("11").Specific.Value).ToString("yyyyMMdd")