Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Work out number of days from a date to present date? (VB)
New Posts  All Forums:Forum Nav:

Work out number of days from a date to present date? (VB)

post #1 of 3
Thread Starter 
(Console application)
I am writing a large program with various options and sub routines to allow the user to have various options and features. I have an option which states the following:
Code:
Dim DoB As Date
 Dim NoD As Integer


Case 3
                    DoBtoNoD()


Console.WriteLine(" 3: Convert Date of Birth (DoB) to Number of Days to present time (NoD)")


Sub DoBtoNoD() ' case 3
        If choice = 3 Then
            Console.WriteLine("Enter your date of birth in this format dd/mm/yyyy")
            DoB = Console.ReadLine()
        End If
    End Sub

Not sure what to write in the sub DoBtoNoD () 'case 3 part.

Thank you.
X79-GCN
(22 items)
 
  
CPUMotherboardGraphicsRAM
Intel 3930K 4.5GHz HT GIGABYTE GA-X79-UP4 AMD R9-290X GEil Evo Potenza DDR3 2400MHz CL10 (4x4GB) 
Hard DriveCoolingCoolingCooling
Samsung 840 Pro 120GB EK Supremacy (CPU) NF F12's P/P (360 Rad)  NF A14's (420 Rad)  
CoolingCoolingCoolingCooling
XSPC Chrome Compression Fittings EK RES X3 150 Primochill PremoFlex Advanced LRT Clear 1/2 ID EK-FC (R9 290X) 
CoolingCoolingCoolingOS
EK D5 Vario Top-X  Phobya G-Changer V2 360mm Phobya G-Changer V2 420mm Win 10 x64 Pro 
MonitorKeyboardPowerCase
BenQ XR3501 35" Curved Corsair Vengeance K90 Seasonic X-1250 Gold (v2) Corsair 900D 
MouseAudio
Logitech G400s Senn HD 598 
  hide details  
Reply
X79-GCN
(22 items)
 
  
CPUMotherboardGraphicsRAM
Intel 3930K 4.5GHz HT GIGABYTE GA-X79-UP4 AMD R9-290X GEil Evo Potenza DDR3 2400MHz CL10 (4x4GB) 
Hard DriveCoolingCoolingCooling
Samsung 840 Pro 120GB EK Supremacy (CPU) NF F12's P/P (360 Rad)  NF A14's (420 Rad)  
CoolingCoolingCoolingCooling
XSPC Chrome Compression Fittings EK RES X3 150 Primochill PremoFlex Advanced LRT Clear 1/2 ID EK-FC (R9 290X) 
CoolingCoolingCoolingOS
EK D5 Vario Top-X  Phobya G-Changer V2 360mm Phobya G-Changer V2 420mm Win 10 x64 Pro 
MonitorKeyboardPowerCase
BenQ XR3501 35" Curved Corsair Vengeance K90 Seasonic X-1250 Gold (v2) Corsair 900D 
MouseAudio
Logitech G400s Senn HD 598 
  hide details  
Reply
post #2 of 3
Can you use .net? If yes, then .net has some classes that are built in that will take the work out of what you are trying to do.
Deus Ex Machina
(19 items)
 
   
CPUMotherboardGraphicsRAM
i5 580M Dell 0R1203 NVIDIA Quadro FX 2800M Samsung 4Gb 
Hard DriveHard DriveOptical DriveOS
TOSHIBA MK3256GSYF  TOSHIBA MK3256GSYF  DVD-Rom HL-DT-ST DVD+-RW GU40N Windows 7 Professional 
Audio
Dell Computer 5 Series/3400 Series Chipset Fami... 
CPUMotherboardGraphicsGraphics
Athlon 64 X2 6400+  Asus M2N-E Nforce 500 SLi 8800GT  9800 GT 
RAMHard DriveOptical DriveOS
OCZ ReaperX WD LG lightscribe Multilayer DVD burner Windows 7 
PowerCase
Antec 500W Smartpower 2.0 Aspire X-Navigator 
  hide details  
Reply
Deus Ex Machina
(19 items)
 
   
CPUMotherboardGraphicsRAM
i5 580M Dell 0R1203 NVIDIA Quadro FX 2800M Samsung 4Gb 
Hard DriveHard DriveOptical DriveOS
TOSHIBA MK3256GSYF  TOSHIBA MK3256GSYF  DVD-Rom HL-DT-ST DVD+-RW GU40N Windows 7 Professional 
Audio
Dell Computer 5 Series/3400 Series Chipset Fami... 
CPUMotherboardGraphicsGraphics
Athlon 64 X2 6400+  Asus M2N-E Nforce 500 SLi 8800GT  9800 GT 
RAMHard DriveOptical DriveOS
OCZ ReaperX WD LG lightscribe Multilayer DVD burner Windows 7 
PowerCase
Antec 500W Smartpower 2.0 Aspire X-Navigator 
  hide details  
Reply
post #3 of 3
Thread Starter 
Quote:
Originally Posted by crimsontears809739 View Post

Can you use .net? If yes, then .net has some classes that are built in that will take the work out of what you are trying to do.
Rep for the help.
I managed to get the program to do what I needed. Just had to change a few lines around and make sure it fitted in with the rest of the main program.
X79-GCN
(22 items)
 
  
CPUMotherboardGraphicsRAM
Intel 3930K 4.5GHz HT GIGABYTE GA-X79-UP4 AMD R9-290X GEil Evo Potenza DDR3 2400MHz CL10 (4x4GB) 
Hard DriveCoolingCoolingCooling
Samsung 840 Pro 120GB EK Supremacy (CPU) NF F12's P/P (360 Rad)  NF A14's (420 Rad)  
CoolingCoolingCoolingCooling
XSPC Chrome Compression Fittings EK RES X3 150 Primochill PremoFlex Advanced LRT Clear 1/2 ID EK-FC (R9 290X) 
CoolingCoolingCoolingOS
EK D5 Vario Top-X  Phobya G-Changer V2 360mm Phobya G-Changer V2 420mm Win 10 x64 Pro 
MonitorKeyboardPowerCase
BenQ XR3501 35" Curved Corsair Vengeance K90 Seasonic X-1250 Gold (v2) Corsair 900D 
MouseAudio
Logitech G400s Senn HD 598 
  hide details  
Reply
X79-GCN
(22 items)
 
  
CPUMotherboardGraphicsRAM
Intel 3930K 4.5GHz HT GIGABYTE GA-X79-UP4 AMD R9-290X GEil Evo Potenza DDR3 2400MHz CL10 (4x4GB) 
Hard DriveCoolingCoolingCooling
Samsung 840 Pro 120GB EK Supremacy (CPU) NF F12's P/P (360 Rad)  NF A14's (420 Rad)  
CoolingCoolingCoolingCooling
XSPC Chrome Compression Fittings EK RES X3 150 Primochill PremoFlex Advanced LRT Clear 1/2 ID EK-FC (R9 290X) 
CoolingCoolingCoolingOS
EK D5 Vario Top-X  Phobya G-Changer V2 360mm Phobya G-Changer V2 420mm Win 10 x64 Pro 
MonitorKeyboardPowerCase
BenQ XR3501 35" Curved Corsair Vengeance K90 Seasonic X-1250 Gold (v2) Corsair 900D 
MouseAudio
Logitech G400s Senn HD 598 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Work out number of days from a date to present date? (VB)