I've got an ASP script connected to a db table with a datetime field which is filled mannually for each record. When I want to select only those records with a date greater than todays date using this sql query:
Select * from fixtures where home_team_code = '" & idno & "' or away_team_code = '" & idno & "' and game_date > '" & today & "' order by game_date asc
it returns all records rather than only records with a date in the future. Is this something to do with the fact that i'm comparing a string to a datetime?? Can I use a VBScript function to make the string comparable to datetime?
I want insert string date from web form into oracle DB, using following to get date value:
sUpdateTime = Request.Form("date")
the date format the user enetr on the web is mm/dd/yyyy: h24:mi:ss (e.g. 04/13/2005 13:35:01). UpdateTime datatype in Oracle is date, so when insert sUpdateTime into DB, using following code got problem, I knew using To_Date (...) in the insert sql, but don't know the syntax.
I have built an online booking system for a hotel and all is working fine except for the fact that the ‘From’ and ‘To’ dates are saved in the MS Access database in US format. The user selects from a date picker pop, which places the in the textfield as English format e.g. 02/12/2007.
However when I try and save this value into the date column in my DB I obviously receive an error because the formats are different. Please could someone advise me on the best way to convert an English date to a US in order to insert this into the DB using ASP & MS Access.
At the moment I am using plain text as the column type, but this is not ideal as I want to start to run queries against the 2 dates.
i need to convert a string to hexadecimal prior to posting it onto the next page...how do i pass the field value to the function prior to posting ? Code:
<% Function StringToHex(str) ' conversion here End Function %> <html> <head></head> <body>
i hope my doubt is clear. i tried looking in the posted forums couldn't find anything . Anyone know how ?
im trying to input some data into a database from a text box to a field with a text data type the problen is when i try to input "44/22" it goes into the database "2"
so it makes the math process
so how can i fix this to insert the 44/22 into the database ?
I've got a string that contains commas and semi-colons to be used as delimiters. It looks like so: 1,1;4,2;
I'm trying to write a function that will turn similar strings into a multidimensional array, but I'm having problems.
Code: Function fncCreateMultiArray(strString, strDelimiter) arrOneDimension = split(strString, strDelimiter) For i = LBound(arrOneDimension) TO UBound(arrOneDimension) arrTwoDimension = split(arrOneDimension(i), ",") Next fncCreateMultiArray = arrTwoDimension End Function
i am trying to connection to the datbase and retrive information from it. At the same time i am using some updation satements.The problem here is i am not able to store values in the database which i declared as 'int'.i tried every possible way.suggest me a way to write into 'int' fields in asp. Do i have to use JScript?? do post if you have any code related to this topic.
I'm uploading a file to my server, and I retrieve the filename. Now I can print out the filename with response.write(filename) but when I try to insert the filename into access I get a "cannot be a zero-length string." error. I'm assuming its because the filename was read in using binaryread. So how would I convert this back into a string?
I have an asp application by the means of which I'm sending cellphone icons in otb format to a company who sends them by sms to the user. The company requires those otb files as hex strings.
I get the EmpID from the form which is a variant. When I do the following, I get an overflow error. Can you suggest of a way I can convert this EmpID to a number?Code:
'Get the EmpID from the form strEmpID = cInt(Request.Form("empid"))
I'm reading through a txt file and using split to create an array of values. I need to convert one element in the resulting array from a string to a number.
However, none of the conversion functions such as CInt, CSng, Val work. I consistently receive a 'type mismatch' error.
I have a databse I am pulling news from and evetyhing is working fine.I made a asp script to generate a XML page, my issue is if any of the feilds have invalid strings for XML
ie & <>
It will break and will not output a proper XML page.Is there a way to convert a string into a valid XML string, I know in PHP there was a HTML encode, but will that encoding type be safe still with XML output?All I see are examples to load files and convert their text into XML safe strings, I just want to convert strings on the fly without loading external files.
I want to convert the binary data to string. I tried doing the same using following peace of code.
Function SimpleBinaryToString(Binary) Dim I, S For I = 1 To LenB(Binary) S = S & Chr(AscB(MidB(Binary, I, 1))) Next SimpleBinaryToString = S End Function
It works fine when the data is English. But when the binary data contains some Japanese characters the resultant string gets corrupted.
I am trying to compare a variable with a db plain text field as follows: access db has field named HFRNUM as text .... ex: 12182003-A
I create a variable in vb as follows: Dim hfr_today HFR_Today = (Month(DATE)) & (DAY(DATE)) & (YEAR(DATE)) & "-A"
Unfortuantely, I think the HFR_Today var is not text and when I look for a record that is LIKE or = the var, it returns blank.
I display my variable and see 12182003-A, yet it does not find the record that matches (except data type perhaps?) Is my variable of a different data type, and if so, how can I make it plain text?
Can anyone please tell me is there any method to convert the week to the date?? For example If the week is 6 then we can get the date where the date is between '2/1/2004' and '2/7/2004'
I ve a problem regarding the date format. i m using access as a database and want to insert date in dd mm yyyy format but wen the date is less than 12 then it converts it into mm dd yyyy and store it like that. this is really creating a problem .
I've got a shipping date field which I read from a database, I want to bring up two weeks of data based on the shipping date.
For example, If the weekday was Tuesday id like to convert the weekday to a date then bring up the results based on the next upcoming Tuesday and all the orders that are inside a future 2 weeks shipping date, as above. How can I convert a weekday to a date, is this possible?