473,795 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Easy date handling?

I'm working on a system that requires alot of date handling, and i'm getting
pretty tired of doing custom calculating when modifying dates, so i hope
someone would be able to help me.
Is there any easy way to do re-calculating of dates? such as adding 2,11
or 36 months to a date, and have it automatically checking whether or not
it should increase months or year, and by how much?

Like, if i have to add 11 months to the date right now, i have to check which
month it's in to see whether or not i could just take one month lesser the
next year and so on...
It's hard to descreibe, but i hope you got the point. Thanks.
--
Regards,
Sune

Jul 22 '05 #1
3 1537
> dateAdd
http://msdn.microsoft.com/library/de...ry/en-us/scrip
t56/html/vsfctdateadd.as p


I was pretty sure there should be a function for it - stupid me for not checking
the vb reference first.
My appologies and thank you very much for the help, i appreciate it.
--
Regards,
Sune

Jul 22 '05 #3
Indeed. Before asking the NG, check www.google.com first. Or
www.w3schools.com or www.aspFaq.com
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3207
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is indeed also true for our language of choice, Python. Its file type allows some extraordinary convenient access like: for line in open("blah"): handle_line(line)
11
1568
by: Gent | last post by:
I have a table named Holding_Value that has several fields in it among which are UID, fkHolding, EffDate, Units, MarketValue, AssetPrice. UID is an identity field and fkHolding is a foreign key to a different table. EffDate is the the effective date while units and marketvalue are values stored in the table. what i'm trying to do is get all the values (fkHolding, Effdate, Units, MarketValue) for all fkHolding for a specific date. That...
8
4098
by: Jeremy | last post by:
We have some date fields in our HTML forms in various places. In the accounts package we use, there is some pretty nifty date handling. It has a standardised date format of dd/mm/yyyy and if you enter e.g. 3-12 it will switch it to 3/12/2005 Same applies for e.g. 3:12 etc Anyone know of some javascript which will do this for our HTML form
1
2608
by: DKode | last post by:
I find myself writing repetitive functions for handling null values from my DB like so: Private Function SetDateNull(ByVal p_date As Object) As Date If (TypeOf (p_date) Is System.DBNull) Then p_date = Date.MinValue End If Return p_date End Function
3
1392
by: Dr John Stockton | last post by:
For an all-numeric Gregorian date to be intrinsically unambiguous, it must generally be of the form /\d{3,}\D+\d+\D+\d+/ ; and we've discussed handling that. But if the month is given in letters (in full, as a LTA, or as Roman numerals) , then the date is unambiguous if the value of the year field is greater than the greatest possible day field value - in which case the year value is greater than the actual day value - whatever...
1
3029
by: JonathanParker | last post by:
Another quick one! Trying to search for records by both accounting period and by year in two seperate queries actioned by option buttons. I've sorted the formatting so it's in a UK format but I keep getting the same error '(3122) you tried to execute a query that does not include the specific expression 'tblAccounting.Period=0406 And tblProduction.DepartmentID=1 ?And tblUtility.UtilityID=1' as part of an aggregate function.' I can't...
2
11515
by: syntego | last post by:
We commonly use triggers to log changes to our main tables to historical log tables. In the trigger, we create a concatenated string of the old values by casting them as follows: CAST(O.MYDATE AS CHAR(30)) When directly updating date fields in the main table, the logged value gets saved in the format YYYY-MM-DD as expected.
3
1626
by: bhavu10 | last post by:
hi i have created a form forreport with today, week month & year CMD Button but i think i wrote the code wrong for month and also it shows me only records for this year whewe as i have 2006 records too code is written in Event Procedure of Respective Cmd Button Can there be a problem in TODAY'S Cmd Button code that it shows me only 2007 record PLEASE HELP. Private Sub cmdMonth_Click()
7
3012
by: bruce.dodds | last post by:
Access seems to be handling a date string conversion inconsistently in an append query. The query converts a YYYYMM string into a date, using the following function: CDate(Right(,2) & "/1/" & Left(,4)) I entered the string "200715" in a record to test an error condition.
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.