Text Manipulation Of Variables Part 2.

Alright, now I'm trying to combine time and date in one variable as such:

Combined = time & " " & date

But instead of getting 12:42:13 PM 6/12/2006, I just want to get 12:42 6/12. How do I strip off the last characters to just get the parts I want? Also, I'd really like to see the time in 24 hour(military) format, but I'm not sure how to accomplish that either.

View Replies


ADVERTISEMENT

Text Manipulation

I've been asked by a friend to try and code something that works like this and I would be able to except for the fact that it's on a IIS server without PHP.

That said, I wouldn't mind learning ASP now that I have a project to learn on, but I need to do it in decent time. Could anybody point me to a package that does something like this that I could pick apart and learn from, or point me to some worth while ASP text manipulation links that might get me a good start on learning what I need to get it done?

And as a last choice if I can't get it done quick enough, does anybody have any links to premade packages that I could purchase that would do the same thing?

View Replies View Related

Extracting Part Of Text

Is there a way of extracting only part of an entry retrieved from a SQL database. For instance, if I have an article of 4000 characters can I extract only the first line of the article and them put a link to the full article after the extracted text.

It is something I have been trying to master and will help me display my retrieved recordset data better.

View Replies View Related

Stripping Part Of The Text

I want to strip email from the text. Some of my users may send me a string:

str = "This is email 1: Join Bytes! and here is email 2: <a
href="mailto:me@me.com">me@me.com</a>"

How do I parse the string to get email address only? mI know I may use instr() to determine if email address exists, but please, give me a hint on how to handle it next.

View Replies View Related

Compare Variables That Contain Text

I was wondering how do you compare variables that contain text strings in ASP. When I use the following If.. Then statement:

If Rs("StyleNo") <> arrStyleNo(aCount) Then

I always get the following error when I try to browse the page:

Error Type:
(0x80020009)
Exception occurred.

View Replies View Related

Stripping Text In Variables

how do I strip this to obtain certain text:

varaible to strip:

connString="driver={SQL
Server};server=SERVER_NAME;uid=USER_ID;pwd=PASSWOR D;database=DB_NAME"

text required:

Server_name, User_Id, Password, DB_Name

View Replies View Related

Writing/retrieving Variables From A Text File?

Does anyone know if it's possible to write and retrieve variables from a text file??

I know how to use the FSO to create text files and write data to them etc. I just don't know how to write a variable to a text file, and retrieve it at a later date??

I would like similar functionality to a cookie. The reason I can't just use a normal cookie is because the data needs to be permanent and I can't risk the cookies being removed off a users machine.

View Replies View Related

String Manipulation

I ran into a problem where I need some help

I am having a form textfield receiving a number like

110000101.

In my sql database i want to have this number being manipulated that it will only insert 100001. How can I do this?

View Replies View Related

String Manipulation

What im trying to achieve is this:

Getting the HTML code of a website, and then extracting specific information. Im trying to get flight information from a website, but there may be more than one flight in a search criteria...so i want it to loop untill it cant get any more.

I've managed to get the html from the other website, and i've also managed to get the first flight on the page.

I believe my problem is with this part of code (might want to review full code below):

Code:

View Replies View Related

String Manipulation

I have a string (ie.1.0.1.39) I want to replace the number after last "." with another number. What would be the best way to do it?
the lenght of the number after last "." may change and the lenght of the number to be replace varies as well

View Replies View Related

String Manipulation

How do I seperate the "chk_" and "33" in the following string:

chk_33

View Replies View Related

Time Manipulation

My attendance system records time IN and OUT in the format 5:00 AM and 5:00PM. I want to generate a report that "how many IN in between 7:00 AM and 8:00 AM"

if have tested as rs("eventtime")>"7:00" and rs("eventtime")<"8:00"

its working but its the same result for AM or PM.How can i differentiate and test AM and PM.

View Replies View Related

Image Manipulation In ASP

I am researching option for doing the following in ASP:

1. Thumbnailing an image as it is uploaded and/or selected by user, basing the thumbnail size on the current image dimensions [hence need to detect image dimensions]

2. Rotate an uploaded image [portrait to landscape and vice-versa]

Googling I find a wide range of mainly commercial COM components for doing this and other manipulations.

I am wondering what is the most "standard" way of doing this in normal ASP (3.0). Do servers tend to have preinstalled components for this? Is there a set of components most commonly used?

View Replies View Related

Browser Manipulation

How do you redirect a script that create a browser without a url address and the size of the browser is intact?

I've seen this before(forgot the site!) but dont know exactly how this is done.

View Replies View Related

TXT File Manipulation

I have a text file that I have to retreve certain parts of it, and store them into variables. *its a lot* You can download the txt file at the following location. What my main goal is to move down past the 2nd set of "****" and start to collect values. (the number of lines before the 2nd set of "****" could change) So i need to store each of the columes into an array. or something liekt hat.

I just need to get the seperated characters by " " into seperate variables for ALL the lines between the 2nd "****" and the 3rd .

View Replies View Related

String Manipulation

I have a dynamic string where the length varies.I need to write a function that will return part of a string, placed between first 2 symbols and last 3 symbols. For example the string DEVELOPMENT will return the following: ...

View Replies View Related

String Manipulation

I have a very long string, that I need to cut up into more usable sections and display or write to text file. It should: Read the string in, move along the string x number of characters then find the nearest end of the sentance, eg. a . or ? write a new line and do this again. Basically I want to end up with a number of lines of full sentances of a similar length.

View Replies View Related

Image Manipulation

I have short term project, and I haven't used ASP in a long time. I need to know about image manipulation, I need to take an image that is uploaded, and make a thumbnail of it, (as well as one about 50% scale).

View Replies View Related

String Manipulation

This looks elementary but I dont know how . How do I remove the trailing text after a symbol @. my_username@email.com and wanted my_username to remain as a result?

View Replies View Related

String Manipulation

I have a first name last initial, all displayed as one. I want to break it appart & show capital letters on the initials. IE: "johnd" > "John D"

Did a search around the forums, but only found info on the "replace" function. Don't think I could do this with that function alone. This should be a simple problem, but I'm pretty new to asp (not to programming though).

View Replies View Related

Database Manipulation

I have a fairly simple access database that I want to be able to view/update/delete etc from a html page using asp. The database would be on a server and would use a dsn connection to it.

View Replies View Related

String Manipulation

I want to split a string like: "mapname1/mapname2/mapname3/" into:

mapname1
mapname2
mapname3

placing them into an array would be great but I really don't know how I can do this?

Is there somebody who could help me out with this please?

View Replies View Related

Photo Manipulation

Is it possible to do any photo (jpg) maniputlation in an ASP script? I'd like to be able to rotate a photo. Also, if it can be done, reduce a file size to produce a thumbnail. If so, can anyone point me to the resources for learning to do this.

View Replies View Related

File Manipulation

i can do this in c++ and vb.net but how in asp can I set the stream to the last line of the file go back 1 line instert charecters in there.

View Replies View Related

How To Access Variables (form Text Box Values) On Same Form?

I have a form on an ASP page that has 5 text boxes, for data entry. I am trying to get data from the text box, and pass it to a hidden text box on the form.

The hidden text box is called "MyDateTime" (a SQL date and time value). I am attempting to concatenate data from two other textboxes (one for date and one for time) to give a string like : "8/8/2004 8:00 AM" I am trying to use the following: Code:

View Replies View Related

ASP String Manipulation/Extraction

I have results from a database which reads like this on my browsers page

20031231

Now I would like to change this so that I can make it look like this

31/12/2003

I am assuming that in ASP there is some kind of function that allows you to extract the string character by character and the concatenate it back together, but I don’t know what it is???? Could someone please pint me in the right direction???

View Replies View Related

ASP Session Variable Manipulation

I was wondering if there is a way to "trim" the session value in ASP. I know that "trim" takes the spaces but what I want is to shorten the actual txt. For Example I have a Session.MM_Username.

This session return the users email address because I am using this as there username for when they log in. Is is possible to only return the characters before the "@" symbol? when they log in I want the user to see "Welcome abc" not
see their email address .

View Replies View Related

Any Samples On Tree Manipulation

Looking for sample code in asp or asp.net which uses two trees the left hand tree having all levels and leaf nodes and the right hand tree containing only levels.

Buttons in the middle to "move" levels or nodes around, add new levels, rename levels or delete levels.

Everything working off a table with parent/child type relationship.

View Replies View Related

Simple String Manipulation

I have an IP Address, for example 15.65.325.98, and I need it to return everything after the third dot including the dot. So in this case, it should return .98. The end of the IP will be dynamic and may contain 1,2, or 3 characters which is why a simple Right() Function will not work.

View Replies View Related

Phone Number Manipulation

I run an eCommerce site and I have a checkout form that requests the customers phone number. I have it set up as one whole field, not broken up: 3,3,4 - too hard to re-work. Therefore a customer is free to enter anything:
(987) 555-1234
9875551234
(9875551234
etc.

I want to format the phone number before it is saved to the database in the following format:
987-555-1234

Basically, I need to strip the number of everything except the numbers and then add a "-" after the 3rd and 6th number?

View Replies View Related

Table Data Manipulation

In an asp page, there is a table defined.

I need help in:

1. populating letters in the bottommost row randomly
2. On selecting any letter in the bottommost row, and pressing any column in the top rows (Row1 Col1), the letter should be displayed in the desired location (Row 1 Col1)

View Replies View Related

Manipulation Of Strings Query

I'm not too hot on my manipulation of strings. I have a database which
cintains names in the format (Upper case also) LASTNAME, FIRSTNAME

I want to search against that database, but the data on the form to produce
the string will be input in the following format: Code:

View Replies View Related

Suggestions For Database Date Manipulation?

I need to write a script that will be able to calculate monthly totals and yearly totals. My database stores the date as "16-Apr-02" and I initially thought I'd just use greater than/less than calculations.

But, this page will need to be generic enough to hold up for a couple years so this option wouldn't work for monthly totals as soon as I get into 2003 right?

So would the best way to go be to parse the date and just look to extract the "Apr", "May", etc for the monthly totals and use the greater/less thans for the yearly totals, or is there even a better way of doing what I'm looking to do?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved