I have 2 textboxes on a form that accept dates. I dont have a drop down box, I just let the user enter the date themselves. I then want to take the dates entered from those two boxes and figure out how many days apart they are. I'm not sure what I can use for this. Do anyone know what I should read about to figure this out? Thanks.

photo123
Recommended Answers
Jump to PostYou can use
DateTime.Parse()
to convert your string to aDateTime
.DateTime
variables can be subtracted resulting in aTimeSpan
containing the difference.
Jump to PostHave missed the AD/BC requirement, wonder why he needs it...
All 6 Replies
rproffitt 2,706 https://5calls.org Moderator

photo123
rproffitt 2,706 https://5calls.org Moderator
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
rproffitt commented: What do you think about their exclusion of AD and BC dates? +15
tinstaafl 1,176 Posting Maven
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.