Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Date Problem
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

The Omega
New Member

55 Posts

Posted - 19 September 2003 :  13:28:06  Show Profile
I am designing a db driven dispatch page for the company I work for and have run into a snag. The host is reddi-web in GB and we are located in TN in the US. Is there anyway to keep dates from rolling over at 6pm cst or to subtract back 6 hours or whatnot.

Thanks

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 September 2003 :  14:08:55  Show Profile  Send ruirib a Yahoo! Message
I don't see a problem. Whenever you need to get the time, get it from the server, subtract the difference in time and show the result. What seems to be the problem with this?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

The Omega
New Member

55 Posts

Posted - 19 September 2003 :  14:09:53  Show Profile
I input whole dates into the db.... and how do I do that...
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 September 2003 :  17:17:32  Show Profile  Send ruirib a Yahoo! Message
Use the DateAdd function. A quick google search should offer you a reference to its syntax.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 20 September 2003 :  09:49:49  Show Profile  Visit Gremlin's Homepage
Microsoft® Visual Basic® Scripting Edition
DateAdd Function Language Reference
Version 2


See Also


--------------------------------------------------------------------------------

Description
Returns a date to which a specified time interval has been added.
Syntax
DateAdd(interval, number, date)
The DateAdd function syntax has these parts:

Part Description
interval Required. String expression that is the interval you want to add. See Settings section for values.
number Required. Numeric expression that is the number of interval you want to add. The numeric expression can either be positive, for dates in the future, or negative, for dates in the past.
date Required. Variant or literal representing the date to which interval is added.


Settings
The interval argument can have the following values:
Setting Description
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week of year
h Hour
n Minute
s Second


Remarks
You can use the DateAdd function to add or subtract a specified time interval from a date. For example, you can use DateAdd to calculate a date 30 days from today or a time 45 minutes from now. To add days to date, you can use Day of Year ("y"), Day ("d"), or Weekday ("w").
The DateAdd function won't return an invalid date. The following example adds one month to January 31:


NewDate = DateAdd("m", 1, "31-Jan-95")


In this case, DateAdd returns 28-Feb-95, not 31-Feb-95. If date is 31-Jan-96, it returns 29-Feb-96 because 1996 is a leap year.
If the calculated date would precede the year 100, an error occurs.

If number isn't a Long value, it is rounded to the nearest whole number before being evaluated.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07