MS Access Date of Birth to Word Convert in Bangla (জম্ম তারিখ কথায় কনভার্ট করুন)
MS Access Date of Birth to Word Convert in Bangla
This Microsoft Access function takes a date of birth value in as a parameter and outputs the number as Word. This function is most useful in a situation like a check where the numbers are displayed as text. The end result is a currency or numeric value will be converted into English Text on the form or report.
Help Video:
Code :
Function DateToWords(ByVal xRgVal As Date) As String
Dim xYear As String
Dim Hundreds As String
Dim Decades As String
Dim xTensArr As Variant
Dim xOrdArr As Variant
Dim xCardArr As Variant
xOrdArr = Array("First", "Second", "Third", _
"Fourth", "Fifth", "Sixth", _
"Seventh", "Eighth", "Nineth", _
"Tenth", "Eleventh", "Twelfth", _
"Thirteenth", "Fourteenth", _
"Fifteenth", "Sixteenth", _
"Seventeenth", "Eighteenth", _
"Nineteenth", "Twentieth", _
"Twenty-first", "Twenty-second", _
"Twenty-third", "Twenty-fourth", _
"Twenty-fifth", "Twenty-sixth", _
"Twenty-seventh", "Twenty-eighth", _
"Twenty-nineth", "Thirtieth", _
"Thirty-first")
xCardArr = Array("", "One", "Two", "Three", "Four", _
"Five", "Six", "Seven", "Eight", "Nine", _
"Ten", "Eleven", "Twelve", "Thirteen", _
"Fourteen", "Fifteen", "Sixteen", _
"Seventeen", "Eighteen", "Nineteen")
xTensArr = Array("Twenty", "Thirty", "Forty", "Fifty", _
"Sixty", "Seventy", "Eighty", "Ninety")
xYear = CStr(Year(xRgVal))
Decades = Mid$(xYear, 3)
If CInt(Decades) < 20 Then
Decades = xCardArr(CInt(Decades))
Else
Decades = xTensArr(CInt(Left$(Decades, 1)) - 2) & "-" & _
xCardArr(CInt(Right$(Decades, 1)))
End If
Hundreds = Mid$(xYear, 2, 1)
If CInt(Hundreds) Then
Hundreds = xCardArr(CInt(Hundreds)) & " Hundred "
Else
Hundreds = ""
End If
DateToWords = xOrdArr(Day(xRgVal) - 1) & _
Format$(xRgVal, " mmmm ") & _
xCardArr(CInt(Left$(xYear, 1))) & _
" Thousand " & Hundreds & Decades
End Function

কোন মন্তব্য নেই