내 머릿속 데이터베이스

지금까지 살아온날 체크 본문

Programming/VB/VB.NET

지금까지 살아온날 체크

파도소리 2007. 2. 8. 18:16

생년월일을 입력하면 오늘까지 몇일이 되었는지 체크하는 함수이다.

Function DayofAge(ByVal birthy As Integer, ByVal birthm As Integer, ByVal birthd As Integer) As Integer
  Dim str_temp As String
  Dim dte_day As Date
 
    str_temp = Str(birthy) & "-" & Str(birthm) & "-" & Str(birthd)
    dte_day = str_temp
   
    DayofAge = Date - dte_day
 
End Function
Comments