473,787 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding no. of Days to the Current Date.

13 New Member
Hi All,

I am having prblm in adding the no. of days passed to the current date, in a class fuction.
This is an immediate requirment plz help..

I am using java.util.Date object for the current date..

Thanks in advance:)
Aug 8 '07 #1
4 2078
JosAH
11,448 Recognized Expert MVP
Hi All,

I am having prblm in adding the no. of days passed to the current date, in a class fuction.
This is an immediate requirment plz help..

I am using java.util.Date object for the current date..

Thanks in advance:)
Have a look at the Calendar class.

kind regards,

Jos
Aug 8 '07 #2
nagarwal
13 New Member
Have a look at the Calendar class.

kind regards,

Jos
Hi Jos,

Calendar is not a fully quantified class to instantiate..so how does it help??
plz be a bit clear..any clues/ links to refer??

Thanks & regrds.
Aug 9 '07 #3
r035198x
13,262 MVP
Hi Jos,

Calendar is not a fully quantified class to instantiate..so how does it help??
plz be a bit clear..any clues/ links to refer??

Thanks & regrds.
The javadocs gives you all that you need. If you open the page for Calendar, you'll see a link to the GregorianCalend ar ...
Aug 9 '07 #4
JosAH
11,448 Recognized Expert MVP
Hi Jos,

Calendar is not a fully quantified class to instantiate..so how does it help??
plz be a bit clear..any clues/ links to refer??

Thanks & regrds.
Did you actuall *read* the API documentation? Even on the first page it tells
you about the getInstance() method that gives you a Calendar you can
work with. Just seeing 'abstract class' is no reason to stop reading.

kind regards,

Jos
Aug 9 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2816
by: Karen | last post by:
I inserted this statement and it worked great for the customers that have no payment history, but for the customers that have a history and an open invoice, it still used today's date in the mix and came back with screwy math. For instance, a customer who actually has an average payment of 20 days and has an open invoice 12 days old was calculated at an average of 102 days.... I'm fuzzy, but not that fuzzy! How do I tell Access to only...
9
2420
by: mistral | last post by:
Need help to remove list of days from date script. Need format "June 07, 2006" <SCRIPT LANGUAGE="JavaScript"> <!-- Begin // Get today's current date. var now = new Date();
17
3451
by: ginajohnst | last post by:
Hi All. I'm having a problem adding days to a date. My date is in the string format dd/mm/yyyy eg. 23/08/2007 in my form field. I can't work out how to add 50 days to that date and then write it to another form field.
4
2847
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi, I have a web application that I need to add 3 days to the Now day, but need to make sure that I skip weekends and holidays. For example if Now is friday, 3 days + now should be tuesday, counting the current day as the first day. Now would never occure on a weekend or holiday. Anyhow just wondering if anyone has any ideas? Thanks. -- Paul G Software engineer.
1
4909
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
5
24556
FishVal
by: FishVal | last post by:
IMHO, the following is not a how-to-do instruction to solve a particular problem but more a concept-proof stuff demonstrating possibilities of SQL. So, let us say the problem is to calculate business days count which is defined as count of days (optionally inclusive in the current implementation) excluding weekend days and holidays. Let us say periods to calculate are stored in table associated with contacts. keyPeriodID -...
1
1082
by: printline | last post by:
Hi' All I have an ordering formular where users can choose on how many working days they want thier order on. I skip saturday and sunday because they are not working days and this works fine. If they place thier order after 3 o'clock in the afternoon an extra working day should be added. This also works fine in my script, but then the problem occurs. Instead of skipping staurday and sunday when they place their order after 3 o'clock, it...
0
1894
by: geraldjr30 | last post by:
hi, i have the following: <?php echo"test"; //The function returns the no. of business days between two dates and it skips the holidays function getWorkingDaysTOT($startDate2,$endDate2,$HOLS){ //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24
0
2761
by: uno7031 | last post by:
Help Please!!! Adding 5 Days to another Date in an access query Good Morning, Help please…. I am new to access and trying to write a query that will add 5 days between a RecDate and a DLPayDate I created the query in design view of access. Current Query: SELECT PaymentCalculator2.ID, PaymentCalculator2.RecDate, DateAdd("w",5+1,) AS DLPayDate, DateAdd("w",5,) AS DLPayDate2 FROM PaymentCalculator2 WHERE...
0
9655
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
9497
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
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4067
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.