By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,385 Members | 847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,385 IT Pros & Developers. It's quick & easy.

calculate age from date of birth

P: n/a
TJS
what namespaces are required so I can do a simple calculate age from date of
birth ?

Nov 18 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
System.DateTime

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from date of birth ?

Nov 18 '05 #2

P: n/a
In VB you can just use the DateDiff function, in C# use the TimeSpan
structure.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from date of birth ?

Nov 18 '05 #3

P: n/a
TJS
I added

"Imports System.DateTime" to my vb file, but keep getting error on
"datediff" when I try to compile ?


"Chris Bower" <ch***********@SPAMunionfedbank.com> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
In VB you can just use the DateDiff function, in C# use the TimeSpan
structure.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from
date of
birth ?


Nov 18 '05 #4

P: n/a
TJS
I added

"Imports System.DateTime" to my vb file, but keep getting error on
"datediff" when I try to compile ?
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uu**************@TK2MSFTNGP09.phx.gbl...
System.DateTime

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from
date of
birth ?


Nov 18 '05 #5

P: n/a
Oh and System.DateTime is a structure, not a namespace.

"TJS" <no****@here.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
I added

"Imports System.DateTime" to my vb file, but keep getting error on
"datediff" when I try to compile ?


"Chris Bower" <ch***********@SPAMunionfedbank.com> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
In VB you can just use the DateDiff function, in C# use the TimeSpan
structure.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from

date
of
birth ?



Nov 18 '05 #6

P: n/a
DateDiff is a function in the Microsoft.VisualBasic namespace.

"TJS" <no****@here.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
I added

"Imports System.DateTime" to my vb file, but keep getting error on
"datediff" when I try to compile ?


"Chris Bower" <ch***********@SPAMunionfedbank.com> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
In VB you can just use the DateDiff function, in C# use the TimeSpan
structure.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from

date
of
birth ?



Nov 18 '05 #7

P: n/a
TJS
that worked

thanks
"Chris Bower" <ch***********@SPAMunionfedbank.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
DateDiff is a function in the Microsoft.VisualBasic namespace.

"TJS" <no****@here.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
I added

"Imports System.DateTime" to my vb file, but keep getting error on
"datediff" when I try to compile ?


"Chris Bower" <ch***********@SPAMunionfedbank.com> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
In VB you can just use the DateDiff function, in C# use the TimeSpan
structure.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
> what namespaces are required so I can do a simple calculate age from

date
of
> birth ?
>
>
>



Nov 18 '05 #8

P: n/a
And the error was?...

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"TJS" <no****@here.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl...
I added

"Imports System.DateTime" to my vb file, but keep getting error on
"datediff" when I try to compile ?


"Chris Bower" <ch***********@SPAMunionfedbank.com> wrote in message
news:ua**************@TK2MSFTNGP12.phx.gbl...
In VB you can just use the DateDiff function, in C# use the TimeSpan
structure.

"TJS" <no****@here.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
what namespaces are required so I can do a simple calculate age from

date
of
birth ?



Nov 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.