Code.GeekInterview.com
 
Code Samples VB.NET
 

Birth Number from Date - Numerology


Code ResourceAuthor: supersubra  

Difficulty Level:

Published: 5th Nov 2006   Read: 5456 times  

Filed in: VB.NET
Add Comment


 

 

Sponsored Links


 

 

Just a small program to create a birth number from date of birth. ?GetNumerologicalNo(BirthDate)

 


Sample Code
  1.  
  2. Option Compare Database
  3. Option Explicit
  4. Public Function GetNumerologicalNo(InDate As Date) As Integer
  5.     Dim dd As Integer
  6.     dd = DatePart("d", InDate)
  7.     If dd > 9 And dd < 19 Then
  8.         dd = dd - 9
  9.     End If
  10.     If dd > 18 And dd < 29 Then
  11.         dd = dd - 18
  12.     End If
  13.     If dd > 28 And dd < 32 Then
  14.         dd = dd - 27
  15.     End If
  16.     GetNumerologicalNo = dd
  17. End Function
  18.  
  19. Public Function GetSingleNumber(InputNo As Double) As Integer
  20.     Dim Length As Integer
  21.     Dim Inputnostr As String
  22.     Dim j As Integer
  23.     Dim OutNo As Integer
  24.     Inputnostr = Trim(Str(InputNo))
  25.     OutNo = 0
  26.     Length = Len(Inputnostr)
  27.     For j = 1 To Length
  28.         OutNo = OutNo + Mid(Inputnostr, j, 1)
  29.     Next j
  30.     Inputnostr = Trim(Str(OutNo))
  31.     Length = Len(Inputnostr)
  32.     OutNo = 0
  33.     For j = 1 To Length
  34.         OutNo = OutNo + Mid(Inputnostr, j, 1)
  35.     Next j
  36.     Inputnostr = Trim(Str(OutNo))
  37.     Length = Len(Inputnostr)
  38.     OutNo = 0
  39.     For j = 1 To Length
  40.         OutNo = OutNo + Mid(Inputnostr, j, 1)
  41.     Next j
  42.     GetSingleNumber = OutNo
  43. End Function
  44.  
Copyright GeekInterview.com


Next: Inventory


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. Lokesh9185
2. supersubra5457
3. jsubha20095263
4. Lokesh M4277
5. sureshrndsoft3175
6. Biswabed Dash2256
7. alaa_eng1644

Active Coders

# Coder NameCodes
1. supersubra1
2. Biswabed Dash1
3. Lokesh1
4. Lokesh M1
5. jsubha20091
6. sureshrndsoft1
7. alaa_eng1

Refined Tags