?
Solved

Need to add time to existing date pulled from a query for display only.

Posted on 2005-03-23
3
Medium Priority
?
214 Views
Last Modified: 2008-03-06
Hi all,

I have this now:

<%=FormatDateTime((rs.Fields.Item("order_datetime").Value),3)%>

which produces the date/time from the databse query. I need to add 30 minutes to this and display it on my .asp page. Any help would be much appreciated.

0
Comment
Question by:Tritorian
[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
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 13613197
Use DateAdd

<%=FormatDateTime(DateAdd("m", 30, (rs.Fields.Item("order_datetime").Value)),3)%>
0
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 500 total points
ID: 13613212
oops - "m" is for "Month", "n" is for Minute; use this instead
<%=FormatDateTime(DateAdd("n", 30, (rs.Fields.Item("order_datetime").Value)),3)%>
and reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctdateadd.asp
0
 

Author Comment

by:Tritorian
ID: 13613336
Thanks so much! I thought it was the DateAdd, but I couldn't figure out how to implement it in my current expression.

Thanks again!
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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

771 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