اذهب الي المحتوي
أوفيسنا

رجاء-- تحويل من ميلادى الى هجري


waleedkamar

الردود الموصى بها

استخدم الدوال التالية للتحويل

1- من الميلادي للهجري

Function ConvertDateString(ByRef stringin As String)

Dim SavedCal As Integer
Dim d As Date
Dim s As String

SavedCal = Calendar
VBA.Calendar = 0
d = CDate(stringin)

VBA.Calendar = 1
s = CStr(d)
ConvertDateString = Format(s, "dd/mm/yyyy")
VBA.Calendar = SavedCal

End Function
2- من الهجري الى الميلادي
Function ConvertDate(ByRef stringin As String) As String
Dim SavedCal As Integer
Dim d As Date
Dim s As String

SavedCal = Calendar
VBA.Calendar = 1
d = CDate(stringin)
VBA.Calendar = 0
s = CStr(d)
ConvertDate = Format(s, "dd/mm/yyyy")
VBA.Calendar = SavedCal

End Function
و طبعا هنا لاداع لاستخدام زر التحويل , ماعليك الا أن تضع مصدر بيانات حقل النص عبارة عن دالة كما يلي
dh=convertdatestring([التاريخ])

تم تعديل بواسطه rudwan
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information