Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




£ To $ Conversion


I want to be able to show prices in £ to UK customers and $ for every one else. Is there a way to do this.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Day Conversion
The following code gets me the day of the month which I use in a query to give me all employees' birthdays for this period. But I have a bug: day variable used in the query must give me todays date(19),it gives me 21 (2 more than I want)

<%
dWeekStart = cDate(month(dWeekStart) & "/" & day(dWeekStart) & "/" & iYearToday)
dWeekEnd = cDate(month(DateAdd("d", 6, dWeekStart)) & "/" & day(DateAdd("d", 6, dWeekStart)) & "/" & year(DateAdd("d", 6, now())) )
sql = "SELECT * FROM bday WHERE maand = "&month(dWeekStart)& " AND dag >="& day(dWeekStart)
%>

Conversion To PHP
I could really do with some guidance. I am currently hosting my website on a Windows Server, and use ASP pages for accessing MS Access database data and also CDONTS for forms to email.I was just wondering if I were to swap to Linux hosting, how easy or hard ( would it be to change these pages from ASP to PHP with the exact same functionality.

Conversion
I created a form to allow a visitor to add a new record to a database with the recordset object. Is there any conversion that needs to take place from the form input fields the user gives me to the recordset object? One of my form fields that I have is going to contain a money datatype in my SQL database and so far it's giving a 500 error.

My code in short looks like:
strCurrentPrice=Request("currentPrice")

then upon adding to the database the code looks like:
rsAddCards("currentPrice")=strCurrentPrice

Datetime Conversion
I am calling a recordset from sql which happens to contain one column that is a datetime in the format: DD/MM/YYYY HH:MM:SS. So when I call that column from the db, it displays in the same format within my page.

However, I would like to be able to display the datetime as part of my recordset, but in a more aesthetically pleasing format (i.e: Sunday 1st May 2000, 7.23PM)

I have tried using the formatdatetime() function along with my rs, but this causes syntax errors. I know this is probably dead simple, but I don't get it!

Cdbl Conversion
I have a money datatype field in a SQL Server database.

I use the following method to take a value passed in the Request.Form collection and convert it to the double datatype:

cmd_AlloUpdateM2__incrdecr = Request("incrdecrA" & a)
cmd_AlloUpdateM2__incrdecr = replace(cmd_AlloUpdateM2__incrdecr,"$","")
cmd_AlloUpdateM2__incrdecr = replace(cmd_AlloUpdateM2__incrdecr,",","")
cmd_AlloUpdateM2__incrdecr = cdbl(cmd_AlloUpdateM2__incrdecr)

I keep getting a type mismatch 'cdbl' error on the line:
cmd_AlloUpdateM2__incrdecr = cdbl(cmd_AlloUpdateM2__incrdecr)

What's weird is I use this in other sections of my code and it works fine...no error. I've checked and re-checked the code and can't find the why this is happening?

Time Conversion
How can I convert seconds to hh:mm:ss format? e.g. 123456s = 34:17:36

Decimal Conversion
Anyone have any code handy to convert a binary number to decimal and a decimal to binary? I need server-side code to perform these calculations. For example, I'd like to be able to pass 129 to a function and it will return 10000001. Likewise, I'd like to pass 10000001 to a function and get 129.
I can do this on paper, just not sure where to start on how to pass these numbers into a function to perform the calculation.

Date Conversion
I am in UK using XP with date format set to dd/mm/yy. I am running an asp
site from a server in USA, which is returning the date from a database field
retrieved as objrec("todate") in US format mm/dd/yy.
To rectify this so as not to confuse visitors to the site I am trying to get
the date displayed as dd month yy , e.g. 25 January 04 by using the format
function format(objrec("todate"), "d-mmmm-yy"). This returns me a VBScript
runtime error "Type mismatch: 'format' "
The data base field "todate" is stored in short date format, which should be
OK shouldnt it?

MySQL Conversion
My database is being converted from Access to MySQL. My question is how do I maintain the database once the switch has taken place? Are there freeware MySQL administration GUI's or something? I'm a little clueless here.

Date Conversion
I have never used dates in ASP or Access (due to being really new to both), but I have trawled the Forum and have come away even more than I started.

I need to input a date that the user puts on a form into a DB.

The DB field is set as a date data type with the format "short date"

Now when the user inputs data using my form everything is entered into the DB except the date

here is how I am trying to enter the date

If Request.Form("renewal_date") <> "" Then
oRS.Fields ("renewal_date") = cdate(Request.Form("renewal_date"))
End if

But it is not working. I am getting no errors it is just leaving the DB field empty.

State Conversion And
I currently am using a script which submits full state names to a payment processor. However, the payment processor only accepts 2 digit state names. Does anyone have a premade code for asp that converts state names into 2 digit ones. Code:

Character Conversion
I have a generic ASP page that creates MD5 hashkey, gets included in more
than 1 other ASP page. Other including ASP pages seem to be setting charset
meta tag to various non-ascii charsets. I found how to convert in ASP.NET,
but not ASP? The same string "fu@bar.com" generates different keys in
different charsets.I tried the "@CODEPAGE=1252" directive at the top
of the hash asp page

Data Conversion In ASP
I have this code to check a valid date format in an ASP file: Code:

HTML And PDF Conversion
I need to get data from database and convert it into HTML and PDF files.

PDF Conversion Component
Have you any suggestion about components (dll, ocx, etc... freeware or not) that can convert file in PDF format through asp code?

String Conversion
I'm currently working on a form that, upon submit, generates an RTF file. I've run into a little formatting issue. If you're typing in a text box, much like this one, and hit Enter to go down to a new line, nothing happens in the RTF coding. For me to have a text box Enter/Line translate into my RTF file, I need to replace it with /par . So, I know about the Replace() string function, but how can I make this work with a carriage return

Html To PDF Conversion
I am basically looking to create / incorporate some form of Auto-PDF generator into a website I am developing, essentially so I can set a webpage which I want it to convert.exactly in the same way that it works when you go to a Webpage then in the Browser you hit Print > and select Adobe PDF printer.This then creates a PDF identical to the webpage you are viewing

I seem to be hitting brick walls with this as I found one option which did this, but this did not support CSS, so exported the page on the fly, but with no formatting whatsoever.I then looked into ASPPDF but this does not allow for this

Mcsv Conversion
I have an mdb database and wish to convert it to csv format file i.e, comma separated version of text file with ASP.Can anyone help me soon.

PDF To HTML Conversion
I have a number of HTML documents that I want to convert to PDF using a server component accessible from ASP.Can anyone tell me which component is the best and cheapest to use? It's a jungle out there

Language Conversion
i have a small project to develop an application that will need to run on a server.

Basic project principals:

1) Parse text from a web page written in English,to application.
2) Convert the text to French.
3) Parse the text back as a new web page, but in French.

I was thinking something like this:

(1)Parse as XML data --->(2) Use VB.net/sql to lookup and convert text ---->(3)Use ASP to create a new Page using the French Text.

Currency Conversion
im looking for some code that will convert an inputted amount in sterling to a number of different currencies.i presume i will have a text box and a series of radio buttons that a user will choose for another currency then a button to initiate the code to convert.
Could it do the currency symbol also? ie £ > $

TIFF Conversion
I am currently generating a report in asp, which then needs to be exported to tiff format. How would I go about this?

Conversion Rates And Vat
I want my site to show prices including VAT. How do I calculate this with vbscript. I also want users to be able to click on a button to convert the price to Euro/dollar/yen - how do I do this and can I use a live conversion rate without having to change it yself (eg get the current rate from a site to use tin the equations)?

Conversion Of Datatypes
I do not know how to convert string datatypes to integer datatypes.

My problem is this:
num = request.form("number")

num is a String. I have to update num to columm named NUM which has a datatype -- long Integer. I have to turn num to integer before updating to NUM. But I do not know the conversion in ASP.

Language Conversion
I'm working on asp project, access 2000 at backend.I can write arabic text and arabic numbers in textbox and save them in database.but if i see these records, arabic text and arabic numbers,it is ok,if my computer is arabicenable.

If my computer is not arabic enable then it show arabic number into english numbers. how can i show arabic numbers instead of english numbers if my computer is not arabic enable. Please tell me i'm working on a project i have to complete it. How can i convert english numbers that are coming from database and convert that numbers in arabic for show.

I have used:

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> ...

Conversion Engine From ASP To PHP
i just put up a web hosting service, the problem is its a linux this means it wont run ASP, he said its expensive to put up a windows server, and his server can only run PHP CGI but not ASP, is there any thing I can do? can i convert ASP pages to PHP?

PHP To ASP Snippet Conversion
How would the file below be translated in to ASP? PHP Code:

<?php
$string = "Kangaroos Rule!!!";
#Open file.txt with a mode of "W"
$fp = fopen ("db/file.txt", "w");
#Write $strink to the file
fwrite($fp,$string);
#Close file.txt
fwrite($fp);
?>
....

On The Fly Currenty Conversion
I have a job for a small ecommerce site that wants prices to be displayed in UK pounds, Dollars and Euros. Ive had a chat with a pal who says you can do it through RSS - tho i havent found a source yet! anyone know of a source or another way this can be done?

Character Conversion
I need to input into an Access database a string. My problem occurs when the string that I grab from an HTML form has a 'in it. I understand why it is doing it. However I do not understand how to fix it.

how do you grab a string from an ASP page such as: "Hello what's up" and place it into an database through ADO. The problem is the single quote. I know how to insert values into a database.

Date Conversion
Code:

DIM mySQL
Dim start_week_1
Dim end_week_1
Dim date_param

date_param = "09/28/2006"

start_week_1 = date_param-(datepart("d", date_param)-1)
end_week_1 = start_week_1 + 6

I keep receiving the following error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "09/28/2006"]'

/Overtime/SQL.asp, line 43

I know that there is a conversion necessary. Possibly Cast(date_param as varchar),but that does not seem to work.

ASP Report To Excel Conversion.
I am developing an application in ASP and want to convert the reports to excel. Copy/paste does not work properly.

Conversion Failed Error
Ok i'm getting a conversion error when i try to do an insert, the table i'm pulling from and the one i'm writing from are the same. i think there is something i can do to define my field data types.

error:

Conversion failed when converting character string to smalldatetime data type

Select Statement

Code:

Chinese Character Conversion???
I've got an english site designed that I need to translate into Chinese.

I've got the Chinese wording to work with but I can't figure out how to get it into my code.

I thought I could simply paste the chinese characters from a Word document into my html editor between <P> tags using the PMingLiU or SimSun font but it just enters like this:
&#20844;&#21496;&#31616;&#20171;: turns into ????:

Problem With CCur Conversion
I have the following code sample and when I run it I get an error "Type mismatch: 'CCur' " at the specific line number. What won't this work? I am puzzzled.

The data type in Access is Currency. I need to convert the string data type to currency in order to add the record in Access Code:

Conversion From StringtoHex And ViceVersa
i am trying to convert a variable from stringtohex using VBScript in <script></script>. the arabic character passed is always converted to 3F no matter what.but the logic is correct since it works if i run in ASP Server Side.What should i change ? Code:

Time Zone Conversion
I got a problem solving on how to convert the following time zone all into EST. My server is currently in EST but i need to convert the following time zone [PST,MST,CST] all into EST given all the exact time. eg 09:00 AM PST, 1:00 PM MST, 2:00 PM CST etc etc.

PST to EST
MST to EST
CST to EST

I've been working for this a week now and i hope somebody will give me sample code

Parsing Text For Conversion
In my main 'submit news' admin for a site I am doing, I want to be able to offer the person submitting the news the ability to reference other files within their text without the need to use HTML. My proposal is to use [square brackets] within the text that will then be parsed when the page is rendered from the database. At present I have this - e.g.

To download the file [file.exe, click here]. Which I want to render with the words 'click here' as being a link to file.exe. I'm very familiar with instr, replace and split (all of which I think I would need to use) but I cannot figure out how to parse the above text in the way I want.

String To Number Conversion
I have a string as "123.45" and want to convert it to 123.45 so that I can do some multiplication calculation. How do I do this so that it could work> I am really lost.

Chinese Character Conversion
I've got an english site designed that I need to translate into Chinese. I've got the Chinese wording to work with but I can't figure out how to get it into my code.

I thought I could simply paste the chinese characters from a Word document into my html editor between <P> tags using the PMingLiU or SimSun font but it just enters like this:
????: turns into ????:

String Case Conversion In DB
if its possible to loop through my entire DB Table and do String Case Conversion. I only want to chnage the case of certain fields. I can get each of the field value and update them easily but I need a way to convert them to the case I want.

The standard LCase and UCase function are ok but I want the formating to be mixed like Title case (in MS Word) or Capitalise (text-transform in HTML/CSS). Basically I've some of the values are in upper case some in lower case I want them all to be Title Case Similar To: Html Css Text-transform Like This Line .

Number To Text Conversion
Im working on a number to text conversion in ASP, just like this : 456 = four hundred fifty six. If you have any cool function, In case you don't, how can I analyze the caracters of a number one by one, and know how much caracters a string has?
Ej = "1234" has 4 caracters

String To Date Conversion
When I'm converting a date like 23-12-2004, everything goes okay, but a date like 5-3-2004 gives some troubles. It converts it in a way that 3 is the day and 5 is the month, but 5 has to be the day en 3 the month. how I can change settings, or has anyone a function which will convert a date in a way I'd like it?

Simple Conversion Problem
i have a form from which i read a numeric value which should be between 1 and 5 and it should also take double datatype (e.g 3.45, 4.56)

i have the following code...it works fine as long as i enter only single number (e.g 3,4,5) but when i enter float numbers, it doesnt work Code:

String To Date Conversion
I have a string like "1/23/2004"

I want to convert it into date..

sdate="1/23/2004"
Dim start As DateTime = DateTime.Parse(sdate)

I know this is done in VB

But whats the syntax to use in ASP?

PHP To ASP Mailform Conversion For Flash Form
I am just wandering if any of you lot can help me with this request, I am up against a deadline and have been up for hours trying to get this to work.

The form was working fine, but the server I am publishing the site to has changed someting (maybe php version) and the flash form I have on all the pages no longer works... I have been advised to do it in ASP instead of PHP.

The flash movie sends the variables to the php form which sends the information to the email address's I have specified in the php form.

I basically need an ASP version of the following PHP mailform.. Can anyone help me with the conversion? - it would be greatly appriciated, as I have gone as far as I can and am really stuck.

Here is the PHP code: ...

Time Format Conversion Question
I have a variable that contains a time value in the format HH:MM:SS that indicates a duration rather than a clock time, and I need to convert it to plain seconds so an input of "00:07:01" would output "421". I'm not too good with time/date conversions, and I can't seem to get this one working right. Is there anyone out there that already has a script that does this or someone who could point me in the right direction?

Num To String Conversion Rounding Issue
I had recently found a function that will write out a currency amount in words. It worked fine until I passed it a variable retreived from the stored procedure.

Well I had to change an "Int()" to "CDbl()" within the function because I got an error: "Variable uses an Automation type not supported in VBScript". I also changed an "(Abs(nAmount)" to an "(Abs(CDbl(nAmount))" because of the same error. Code:

Excel To HTML Conversion Automation
We have a excel document, which is been updated regularly. After everyday
updating, we export as HTML file and upload it.
As a ASP programmer, I want to write a script, which can parse this excel
file and make it as a web ready file.
Is there any simple way to do this?
Our data entry operator, is very new to computers and all he know is a
little in Excel.

Conversion ASP In WORD Results HTML
That happens only in a little LAN (win2003 server, XP client with
office XP).

You know the couple of instructions

Response.ContentType = "application/msword"
Response.AddHeader("content-disposition", "inline;
filename=stampa.doc")

that convert an asp page in word.

Well, in this LAN you can save the .doc file but when you open it you
see the HTML code of the page.

It depends on
1 - An option of IIS, server ?
2 - An option of the browser, client ?
3 - An option of Word, client ?

The same page works correctly everywhere.


Copyright © 2005-08 www.BigResource.com, All rights reserved