Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2005-03-23
3
Medium Priority
?
226 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
  • 2
3 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 13613197
Use DateAdd

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

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

577 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