Converting Using Formatdatetime()
how to convert a date in (tuesday,may 17,2005) to a date in(17/05/2005) format. is it possibleto dowith the helpof formatdatetime() function. if possible how ?
View Replieshow to convert a date in (tuesday,may 17,2005) to a date in(17/05/2005) format. is it possibleto dowith the helpof formatdatetime() function. if possible how ?
View RepliesI have a field in my database that records the date/time of various events in the usual format of dd/mm/yyyy/. I need to display this field on my asp page in a string format.
Is there another function out there that does the opposite of the cdate function?
I have tried using the FormatDateTime to convert, but without any luck?
Code:
Response.Write("<br /> " & FormatDateTime(Date, 1)( objRS("END_DATE")))
Is there any way to define the default date/time format, instead of having to format every single time you print a date/time?
View Replies View RelatedI set my computer Regional Setting (Control Panel - Regional and Language Options - Customize - Date) to dd/mm/yy. In my ASP page I do the following:
FormatDateTime("1/20/07",2)
and it returns 1/20/07 instead of 20/1/07. I though my setting it to 2, it will display a date using the short date format specified in your computer's regional settings, how come it is not ? How can I set the string to display a date using the computer's
regional setting ? IIS is running on my machine, I am not on a network, it is just my
machine.
I set my computer Regional Setting (Control Panel - Regional and Language Options - Customize - Date) to dd/mm/yy. In my ASP page I do the following:
FormatDateTime("1/20/07",2)
and it returns 1/20/07 instead of 20/1/07. I though my setting it to 2, it will display a date using the short date format specified in your computer's regional settings, how come it is not ? How can I set the string to display a date using the computer's
regional setting ?
I get the error
Type mismatch: 'FormatDateTime'
When I use dtmTime = FormatDateTime(val,vbLongTime)
why? The date store in my database is 02/09/2004 11:27:28.
I have a simple four line bit of code in a page on my web site that gets today's date, formats it (FormatDateTime(thedate,2), and compares it to a date drawn from a database which is formatted the same way, and then if the two match, writes a message on the page.
Dates in this format work just fine:
Jun 09 1975 12:00AM
However, most dates in the database are in this format:
Monday, June 09, 1975 12:00:00 AM
and I get Data Type Mismatch errors from those when it tries to format the date. Evidently, it doesn't think this is a valid date format. In the database (SQL Server), the field is set up as datetime, so I wouldn't think there'd be a problem. I'm just missing something small, I think, but I'm not sure what it is.
I'm using FormatDateTime(Now) on a form to include when the form was submitted. The problem is that my time zone is 1 hour ahead of the time zone in which my server is located. Is there an easy way to increase the hour by +1?
View Replies View Related<%response.write(FormatDateTime(rs("Adate"),2)) %>
I am getting the following error:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'FormatDateTime'
Please explain why I am not able to use the FormatDateTime function.
I am trying to extract the time out of a date/time but recieve the type mismatch error. The data is stored in an Oracle database as a Date/Time and I am able to extract it from the DB and display it on the screen OK, but when I try and format it like this:
Dim timeofpurchase
timeofpurchase = FormatDateTime(rscustomer("time_of_purchase"), 4)
I get an error. I have had a look at documentation on the web but all of the examples only show how to format the current date and time, not how to format a variable that contains a date.
My question is, how do I force my variable, rscustomer("time_of_purchase"), to be treated as a time?? or how do I declare the variable timeofpurchase to accept a date/time??
I'm using an asp function FormatDateTime() in IE6 and it's working perfectly. When I try use it in Firefox it throws;
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'FormatDateTime'
/evacation_DEV/common/objects/calendar.asp, line 94
This line is;
objNewDay.DateString = FormatDateTime(DateSerial(mnYear, mnMonth, nDayIndex),2)
mnYear, mnMonth and nDayIndex are set to Integers. Has anyone any idea of how I can fix this?
I am using two fields on a form to capture time someboby is working. The fields are hours and minutes. How can I when submitting to the db take both fields and convert them to a single field in the db as minutes?
View Replies View RelatedI'm looking for a control to us on our web site that will take our reports
that are generated in PDF and convert them to DOC format all on the server.
We are using win2k3 web servers if that helps.
I have developed an access database with VBA. Right now its on a network drive and is shared by 75 users. Works fine.
Now I would like to have this in the company intranet. Is it advisable to go with ASP? I recently installed IIS in my system. After that I have no idea how to convert my application to ? Is there a website or any walk through how to get my stuff's solved.
My application has 20 input screens, data add, save, update and also sends email based on certain rules. Is it possible to do all these stuffs?
I want to convert CSV file to XLS. Is there anyway this can be done in ASP without renaming the file to XLS.Also can there Macros to Sort data in it while generating XLS?
View Replies View RelatedWe are evaluating a clients request for converting their existing site using cgi and flat text files to ASP 3 and Access.
The site displays: their products that are broken down into sub categories, guest book, and a survey.
I am only "aware" that text files can be imported into Access but have never done it.
I have some PHP scripts that need to be converted to ASP3 so that they can run on a Micrsoft NT server using ADO. My knowledge of ASP is limitied so i was hoping you could answer a few questions..
1. Is ADO part of ASP.net or is this completely different?
2. Is ASP3 the same as ASP.net?
3. Is there any advice you can give me regarding converting from PHP to ASP3?
I've stored a set of months in an access database as numbers but when it display on the front end I need it to display as the name of the month.
How would you convert the numbers in the database to their word equivalent? Or is it possible to arrange the months in their correct order in the database?
I have an existing application in asp. I need to add new functionality can I do using ASP.net ?
View Replies View RelatedDo we have any function in ASP that will convert US time(which is captured in the database) to IST
View Replies View RelatedMy data input page uses a id generator which includes dashes, and the
corresponding column in the db is set up as varchar to handle that.
There is a problem, however, when the value in the varchar column is
compared to the string from the URL, and the following error message
occurs:
"Syntax error converting the varchar value '071-213' to a column of
data type int."
<%strSQL = "SELECT * FROM AMS where MinutesID = " & Request ("id")%>
Would it be possible to CAST the request string to varchar?
I am passing a string into a page and them looking up info to display from a database based on whats passed in. The link is www.domain.com/page.asp?variable='12345678'
Once inside the page the following code is executed Code:
i want to convert asp file to excel sheet through asp application. iam having report.asp file as a view form i need that form to convert in excel sheet can you help me.
View Replies View RelatedI have a project to do that requires that I use mysql as the database. I have only used MS Access. The sql will be simple searches.
Is there a drastic difference, or just different punctuation?
Can I find a copy of mysql on the web? If so, is there any advice on installing?
I am trying to get values from our database which are in a single field, into seperate variables.
I have a field called locations, with multiple values example... "East Sussex, London & Home Counties, Scotland"
I would like to get each of these into seperate variables e.g.
variable 1 = East Sussex
variable 2 = London & Home Counties
variable 3 = Scotland.
I guess it will need some sort of regex to detect number of commas, then a loop or something.
To make things slightly easier, none of the values in the locations field have commas inside them.
While I've used Access's export function in the past to generate ASP from
the tables, I wonder whether there's anything around to do a more
comprehensive automatic conversion. I've noted a few ads for such products,
and I wonder/hope there's some experience around here that might be shared -
with recommendations.
I am using XMLhttp and responsebody to receive info from a webpage
I dont use responsetext since i need the international chars едц
The information I recieve is binary is there any fast way to convert the
binary data to text ?
I used this function but its slow compared to response.binarywrite
and i need the information in a string so I can alter it with my script.
So is there any way to convert Binary to Text just as fast as
response.binarywrite ?
Function BinaryToString(Binary)
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1
Next
BinaryToString =
rtf files cause so many troubles,i.e.,allow the users to download the files, slow loading,incompatible with other browser, and so on. Do you think I should convert them to JPEG files to embeb them into HTML?
Once converting JPEG,it is easier to programming in HTML(i.e.,just add the image tag),load faster,and prevent the user from download the files?
I have a form with multiple text fields, when i submit the form i want it to edit a table in my database using UPDATE. I know i have the syntax correct. The problem I have is 2 fields are Currency and 2 are Date. The request.form command always returns a string and i keep getting the 'Data type mismatch in criteria expression' error. How do i convert the strings to dates, and strings to Currencies.
View Replies View RelatedHow do I convert this into something that I could read into an HTML email? I can string regular text but have NO IDEA how to convert syntax for a checkbox into HTML.
Can anyone give me some direction? My code for my checkbox is below. The msgBody is the string I'm building to send in my email. Code:
Im having serious trouble converting CDONTS to CDO and was wondering if anyone would be able to give me a hand. Here is the CDONTS code:
View Replies View RelatedI have an account opening form of a bank..its in HTML format which needs to be converted into PDF. Also,some dynamic content neess to be added to the PDF depending on the user logged in.
View Replies View RelatedI need help with converting the following function in ASP.Net (VB.Net) to Classic ASP:
Function EncryptIt(_strClearText as String, _strEncryptionType as String) as String
dim strEncryptedText as String
'Encrypt the text
strEncryptedText = FormsAuthentication.HashPasswordForStoringInConfig File(_strClearText, _strEncryptionType)
return strEncryptedText
End Function
Code for Const under Button Click Event in ASP.Net:
const strENCRYPTION_TYPE = "SHA1"