سلام به هم استادان عزیز.
ممنون زحمات شما می شوم اگر بفرمایید که آیا کامپوننتی هست که تاریخ میلادی و شمسی و قمری امروز را نشان بدهد.
به این حالت
یکشنبه
۲۸ خرداد ۱۳۹۶
٢٤ رمضان ١٤٣٨
18 June 2017
تشکر ویژه از شما عزیزان.
Printable View
سلام به هم استادان عزیز.
ممنون زحمات شما می شوم اگر بفرمایید که آیا کامپوننتی هست که تاریخ میلادی و شمسی و قمری امروز را نشان بدهد.
به این حالت
یکشنبه
۲۸ خرداد ۱۳۹۶
٢٤ رمضان ١٤٣٨
18 June 2017
تشکر ویژه از شما عزیزان.
سلام
میلادی رو که سیستم خودش میده ...
اما برای تاریخ خودمون من از این کلاس استفاده میکنم :
تو یه کلاس بذارش و از صفحه هایی که میخوای صداش بزنکد HTML:
Function Datelong() As String
Dim TimeString As DateTime = DateAndTime.Now()
Dim Intdiffrenttime As String = "+3.5"
If Val(Datesal("mah")) < 7 Then
Intdiffrenttime = "+4.5"
End If
If Val(Datesal("mah")) = 6 And Val(Datesal("roz")) = 31 Then
Intdiffrenttime = "+3.5"
End If
Dim theUTCTime As DateTime
Dim localZone As TimeZone = TimeZone.CurrentTimeZone
theUTCTime = localZone.ToUniversalTime(TimeString)
theUTCTime = theUTCTime.AddHours(Intdiffrenttime)
fary = far30.GetYear(theUTCTime)
farm = far30.GetMonth(theUTCTime)
fard = far30.GetDayOfMonth(theUTCTime)
fardw = far30.GetDayOfWeek(theUTCTime)
Dim Saat As String = far30.GetHour(theUTCTime)
Dim Daghighee As String = far30.GetMinute(theUTCTime)
'Dim Saat As String = DateAndTime.Now.Hour.ToString
'Dim Daghighee As String = DateAndTime.Now.Minute.ToString
'-----
If farm = "1" Then
farm = "فروردین"
End If
If farm = "2" Then
farm = "اردیبهشت"
End If
If farm = "3" Then
farm = "خرداد"
End If
If farm = "4" Then
farm = "تیر"
End If
If farm = "5" Then
farm = "مرداد"
End If
If farm = "6" Then
farm = "شهریور"
End If
If farm = "7" Then
farm = "مهر"
End If
If farm = "8" Then
farm = "آبان"
End If
If farm = "9" Then
farm = "آذر"
End If
If farm = "10" Then
farm = "دی"
End If
If farm = "11" Then
farm = "بهمن"
End If
If farm = "12" Then
farm = "اسفند"
End If
'-----
If fardw = "6" Then
fardw = "شنبه"
End If
If fardw = "0" Then
fardw = "یکشنبه"
End If
If fardw = "1" Then
fardw = "دوشنبه"
End If
If fardw = "2" Then
fardw = "سه شنبه"
End If
If fardw = "3" Then
fardw = "چهارشنبه"
End If
If fardw = "4" Then
fardw = "پنج شنبه"
End If
If fardw = "5" Then
fardw = "جمعه"
End If
'-----
Return (fardw + " ، " + fard + " " + farm + " " + fary + " ، ساعت " + Saat + ":" + Daghighee)
End Function