Current location: Hot Scripts Forums » Programming Languages » ASP » Adding 8 hours to hour function


Adding 8 hours to hour function

Reply
  #1 (permalink)  
Old 08-26-05, 10:01 PM
tbig's Avatar
tbig tbig is offline
Newbie Coder
 
Join Date: Jan 2004
Location: Massachusetts
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Adding 8 hours to hour function

Hi guys,

I'm trying to save a record to the database where it takes the current time and adds 8 hours on to it. Reason being the server is located in a different time zone. Anyways I though I could do:

Code:
date & hour(time) + 8 & minute(time)
or..

Code:
date & hour(time + 8) & minute(time)
but both of these generated a "type mismatch" error.

Any help would be superb.
__________________
Cheers!

TBig
Reply With Quote
  #2 (permalink)  
Old 08-26-05, 11:08 PM
rrhodes's Avatar
rrhodes rrhodes is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Use the "DateAdd" function to add 8 hours to your date.

Here is some doc: http://www.w3schools.com/vbscript/func_dateadd.asp
__________________
Robert
Gee! Web Tools
Web Content Management / Internet Marketing modules including:
Page Editor - Calendar Manager - News Editor - Contact Organizer - Mail Wizard
Reply With Quote
  #3 (permalink)  
Old 08-27-05, 12:29 PM
tbig's Avatar
tbig tbig is offline
Newbie Coder
 
Join Date: Jan 2004
Location: Massachusetts
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
I knew it was something simple that I overlooked. Thanks =D
__________________
Cheers!

TBig
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP upload prob minority ASP 1 06-27-05 08:35 AM
Complex interactive menu/navigation Function - adding to it! Rusty Ranchero JavaScript 1 06-10-05 10:44 AM
PHP Error Fairnie PHP 8 06-26-04 07:15 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
Help trim code down TheLaughingBandit JavaScript 0 09-02-03 09:50 AM


All times are GMT -5. The time now is 03:30 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.