Code.GeekInterview.com
  I am new, Sign me up!
 
Code Samples VB.NET
 

Birth Number from Date - Numerology


Code ResourceAuthor: supersubra  

Difficulty Level:

Published: 5th Nov 2006   Read: 2506 times  

Filed in: VB.NET
Add Comment


 


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: Remove Blank Lines from Script Files


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Comment


Members Please Login

Name:  Email: (Optional. Used for Notification)

Title:
 
Comment:
Validation Code: <=>  (Enter this code in text box)





Popular Coders

# Coder NameHits
1. Lokesh5943
2. supersubra2507
3. Lokesh M1558
4. Biswabed Dash829

Active Coders

# Coder NameCodes
1. supersubra1
2. Biswabed Dash1
3. Lokesh1
4. Lokesh M1

Refined Tags

 

Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact  

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape