Solved

VB.net date code

Posted on 2013-06-28
5
270 Views
Last Modified: 2013-06-28
What does this code do?

dtEnd = DateSerial(Year(dtSomething) - 5, Month(dtSomething), Day(dtSomething))
0
Comment
Question by:vbnetcoder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 39284181
it assigns to dt end a date that is five years prior to the date in dtsomething

It subtracts five from the year portion then reconstitutes the date from the new year value and the same day and month
0
 

Author Comment

by:vbnetcoder
ID: 39284186
so basicly it returns the date five years earlier?
0
 
LVL 13

Accepted Solution

by:
Philip Pinnell earned 500 total points
ID: 39284200
yes

so for dtSomething = today (28/06/2013)

dtEnd would be  28/06/2008
0
 

Author Closing Comment

by:vbnetcoder
ID: 39284227
ty
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 39284264
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question