28-11-18, 03:41 PM
28-11-18, 09:22 PM
اذا كنت تريد جلب الشهر والسنة الحالية للجهاز :
اما اذا كنت تريد إعادة فورمات التاريخ بواسطة تكست بوكس :
كود :
TextBox1.Text = Date.Now.ToString("yyyy/MMM")اما اذا كنت تريد إعادة فورمات التاريخ بواسطة تكست بوكس :
كود :
TextBox2.Text = CDate(TextBox2.Text).ToString("yyyy/MMM")29-11-18, 09:41 AM
ينقل الموضوع الى القسم المناسب له
تحياتى لك
وتمنياتى لك التوفيق
02-12-18, 09:38 PM
ويضا
كود :
Textbox1.text=now.month03-12-18, 06:01 AM
هذا الكود المطلوب
كود :
Private Sub ddat_chang()
txt_year.Text = Format(ddet_date.Value, "yyyy")
Dim mn As String
Dim yy As String
yy = ddet_date.Value.Year
'1
If ddet_date.Value.Month = 1 Then
mn = "يناير - "
txt_month.Text = mn + yy
End If
'2
If ddet_date.Value.Month = 2 Then
mn = "فبراير - "
txt_month.Text = mn + yy
End If
'3
If ddet_date.Value.Month = 3 Then
mn = "مارس -"
txt_month.Text = mn + yy
End If
'4
If ddet_date.Value.Month = 4 Then
mn = "إبريل -"
txt_month.Text = mn + yy
End If
'5
If ddet_date.Value.Month = 5 Then
mn = "مايو -"
txt_month.Text = mn + yy
End If
'6
If ddet_date.Value.Month = 6 Then
mn = "يونيو - "
txt_month.Text = mn + yy
End If
'7
If ddet_date.Value.Month = 7 Then
mn = "يوليو -"
txt_month.Text = mn + yy
End If
'8
If ddet_date.Value.Month = 8 Then
mn = "أغسطس -"
txt_month.Text = mn + yy
End If
'9
If ddet_date.Value.Month = 9 Then
mn = "ستمبر -"
txt_month.Text = mn + yy
End If
'10
If ddet_date.Value.Month = 10 Then
mn = "أكتوبر -"
txt_month.Text = mn + yy
End If
'11
If ddet_date.Value.Month = 11 Then
mn = " نوفمبر -"
txt_month.Text = mn + yy
End If
'12
If ddet_date.Value.Month = 12 Then
mn = "ديسمبر -"
txt_month.Text = mn + yy
End If
End Sub