i'm importing a date ( 13/2/2005 1:20:22 PM) from SQL server
to informix.
The problem now is informix doesnt accept alphabet in datetime format,
so i plan to convert it before the date insert into informix db.
But the problem is i dont know any function that can convert the date time
from 12 hours format to 24 hours format.
I need to get average of the hours after (start_date - end_date). *start_date and end_date is in format 'mm/dd/yyyy hh:mi:ss am' . Is there any function in oracle that i can use so that i can directly get the average of the hours in SQL statement?
I can subtract a day, but that's by only having ONE integer...what do I do for hours? (i need this because our server uses EST and clients need their TimeZone)
how you convert an integer such as 5 into an hour string so the system identifies it as an hour instead of just the number 5 and then once you do that ("if you need to do that at all") add 5 hours to the current time...
Also is there a way way to add lets say 50 hours to our current time and date so when it is calculated it shows 2 days and 2 hours away from now... If you cant do that it would be nice to know how to change 7.85 into just 7... or 8.94 into just 8... no rounding up or down just the first number before the decimal.
I am using a select sum(tot_daily) as total hours ...it calculates the time incorretly... Example: ID | Tot_hrs | Person ---------------------- 1 5.45 A 2 5.45 A 3 5.45 A
The total hours should be 17 hours 15 mins...but the result comes as 16.35.... Is there a way to calculate it as 17.15 in db level in a select statement
Count number of Database Records between NOW and 24 HOURS EARLIER? I know how to retrieve recordsets etc - its just the date thing I cant grasp. I am stuck getting the 24 hours earlier data capture.
I have a request from the boss to make a report that will require me to display how many hours something has been in a particular state. (As in status). Hard to explain. Anyway, I need to go to the table in the db, find all rows for a particular trouble ticket, find when they were put into one of our 7 statuses, when they were put into another status (this info is already in those rows), then determine how many hours they spent there in each status.
So a ticket report will say that ticket 1000 spent 4 hours in customer research, 5 hrs in our company coding. 3 in our company testing, 4 in customer testing, etc.
The thing is, It has to assume an 8-5 workday, and leave out any hours which don't fall in between 8 am to 5 pm, and also rule out any weekends.
I'm trying to write a script to countdown the number of hours and minutes until tomorrow. So far, this is what I have:
Code: <% response.write(dateDiff("h",now(),date+1)) & " hours and " & dateDiff("m",Time(),date+1) & " Minutes " %> The code above correctly displays the hours until tomorrow. but it's not displaying the minutes correctly. It's displaying the total minutes until tomorrow. If there at 4 hours left until tomorrow it's saying "4 Hours and 240 minutes."
Been playing with the function DateDiff, and with it it's easy to calculate the difference in years/months/days between two dates. However, if i wanted to calculate the difference in Years, Months, Days, Hours, Seconds (a la Ebay bids) how can I do this? Is it easy or complicated?
Ive got some code on my site that shows how current the database is. Basically it looks at fixed text file that I am basing the database on, checks to see iwhen it was created, then displays the time.
My webserver must be on the East Coast and I am on the West Coast, so the time the stamped file time is 3 hours ahead. Code:
building variable width/DB tables etc using getrows instead of movenext. Performance is a major concern as this app requires SSL.
My question is, when does it become more about the challenge of building faster apps vs. getting the job done??? If my calculations are correct, I just added an extra 10,000+ possible hits within a 12 hour day or so.. an extra 10,000 hits???!!! What percentage of applications do you think will ever see this kind of traffic?
Is this insane? If this app ever gets maxed out, will my end users ever realistically notice a difference?
I have the tables set up in Access, viewing in column format on ASP pages but now the company wants the schedule reports to be in a wall-calendar type format. I've searched and found calendar scripts but I need one that's creates a table resizable to a report size format. Using the existing MS Access db I've written is also a plus.
I was wondering what would be the best function to format a name. Say I have a function FormatName that takes in a string that is FRED SMITH and needs to return Fred Smith. The function basically needs to make sure the first character of each word is capitalized. What is the best way to do this?
how do you format an email in asp. For example: i want my email to read, The following customer has requested two tables then on the next line, it should provide customer's name then next line address and on and on. Quote: Originally Posted by nschafer Or if you want a button instead of a link:
I must have the format of the below line wrong for IE:
click <a href="cal.asp?sdate=<% =strDate1 %>&location=<% =strLocation %>&eTime=<% =strDate2 %>">here</a> to add this information to your Calendar<br>
When I hover my mouse over the link, the status bar at the bottom of the page for IE says: shortcut to 2006 11:00 AM With Firefox I get: http://sd-school/forms/cal.asp?sdate=10/18/2006 10:00 AM&location=Library&eTime=10/18/2006 11:00 AM
The form works in Firefox, which is what I use for testing. So either the format is wrong, or IE doesn't like the spaces or something. It doesn't matter which dates I use, I get the same results.
At the moment I'm entering a new record in my database for every pageview (the record holds several things like IP, useragent..etc). I think this is asking too much of my database, and I get a lot of errors all the time. Perhaps I should switch to entering each 'record' into a XML-file, and use that for my statistics? Any disadvantages, performance issues?
i am encountering some problems in converting some data into CSV format..i have alreadi retrieve the data however i do not knoe of ani methods of converting to CSV...is there ani method to save the directory to .csv
I have a problem don't know how to write the attachment file frm mail....
<html> <head> <title>Thank you for reply with us.</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <%@ Language=VBScript %> <% Dim strBody Dim myElement
For Each myElement in Request.Form Select Case Left(myElement ,3) Case "txt","sel","rad": strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _ ": " if Len(Request.Form(myElement)) = 0 then strBody = strBody & "UNANSWERED" else strBody = strBody & Request.Form(myElement) end if
strBody = strBody & vbCrLf
Case "chk": strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _ ": " & Request.Form(myElement) & vbCrLf Case "are": strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _ ": " & Request.Form(myElement) & vbCrLf End Select Next
strBody = strBody & vbCrLf & strFooter
'Time to send the email 'Dim smtp Set smtp = server.CreateObject("CDONTS.NewMail")
'****************************************** ' set the mail properties '****************************************** smtp.Subject = "ApplicationForm" smtp.From = "ApplicationForm" smtp.To = "connie@auroraxsis.com" smtp.Body = strBody
'****************************************** ' fire off the email message '****************************************** smtp.Send 'Response.Redirect "thankyou.asp"
'****************************************** ' check return value error code '****************************************** 'if objMail.errorCode = mmeNone then ' Response.Redirect "thankyou.htm" 'else ' Response.Write ("Mail message was not delevered to the SMTP server." & "<br><br>") ' Response.Write ("Please try again later" & "<br><br>" ) ' Response.Write ("The error code was :" & Cstr(objMail.ErrorCode) & "<br><br>" ) ' Response.Redirect "" 'end if
'****************************************** ' always destroy the object '****************************************** ' set smtp = Nothing
' Response.Write ("Thank you for advertising with us. We will revert to you soonest possible.")
' Response.Redirect strRedirectURL %> </HTML>
<script language="JavaScript"> <!-- //set message: msg = "Welcome To International Education Counsultancy"; timeID = 10; stcnt = 16; wmsg = new Array(33); wmsg[0]=msg; blnk = " "; for (i=1; i<32; i++) { b = blnk.substring(0,i); wmsg[i]=""; for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b; }
function wiper() { if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0]; if (stcnt-- < -40) stcnt=31; status = str; clearTimeout(timeID); timeID = setTimeout("wiper()",100); }
I use an ASP mail object to send orders filled online to a recipient via an e-mail. I would like to know if it's possible to format the way the order looks in an e-mail? I tried the following, but see no change in the format:
Does anyone know if it's possible to format the way the text look in an e-mail that is sent using the ASP Mail Object? Is there a different way of controlling the format/appearance of the text that appears in an e-mail?
I've looked over the last 2000 posts for info on incorportating an RSS feed on a web page using ASP to control the display - especially which elements are shown and how many items are shown. I found a free ASP script that I hoped would do the job >>>
I've had some excellent help before on this forum and hoping for some more. This is probably very basicbut I'm kind of muddling along a bit and it's a miracle I got so far.I have a memo text field in a table form and I'm wanting to enter text into it but all a small amount of formatting. Just basic paragraph breaks would be a start. This is kind of following on from a previous post of mine where I was trying to include line breaks. This was the solution.
I have some pictures in database.now i am printing it using response.write in one page.It is working properly.I want to print it in such away(it should follows google page)like every page it should print 2 and then another page.