Date Formatting In Oracle/ASP

I'm returning a date (5th Jan 2004) from Oracle using the
following query:

select TO_CHAR(invoice_date,'DD/MM/YYYY') from...

This should return my date in the UK format, and it
certainly appears to be doing just that in Toad. And it
also looks correct in my form as it shows as:

05/01/2004

However when I submit my form I am having to convert the
date to an Oracle format using this function: Code:

View Replies


ADVERTISEMENT

Date From An Asp Into Oracle

I'm calling an update procedure from Oracle using ASP..

<pre>
With objCommand
.CommandText = "{call cust_Update(?, ?, ?)}"
.CommandType = adCmdText
.Parameters(0).Value = varCus_id
.Parameters(1).Value = varf_Name
.Parameters(2).Value = varbirthdate
.Execute() ............
</pre>
the problem I'm having is when entering the birthdate. This is the error I get...
Microsoft OLE DB Provider for Oracle error '80040e14' I believe it has something to do with the delimiter in the date string("/"), but not sure? The Oracle procedure birth_date column is in "mm/dd/yy" format:
birth_date=to_char(i_birth_date,'mm/dd/yy')....
When I pass this in the textbox from the asp in this format I get the error? How can I resolve the ASP to take in the right characters for the birthdate?

View Replies View Related

Retrieving Oracle Date

I'm having hard time retrieving oracle date with the follwing sql statement:

Select * From Document Where Mydate= #" & RS("Mydate") & "#"

I get ORA-0091 invalid character error. Then I used the TO_Date function as follow:

Select * From Document Where Mydate= To_Date(RS("MyDate"),'mm/dd/yyyy')"

I get the error expected end of statement: Now When I inser an explicite date it works

Select * From Document Where Mydate= To_Date('03/28/2005'mm/dd/yyyy')"

How do I bind Mydate into a variale and use it in the TO_Date Function .

View Replies View Related

Oracle System Date

I am trying to enter date into oracle databalse & using oraoledb since im taking system date but the value inserted is this "20-JUL-18".

I used date()

How to format the date as to include the year in date.

View Replies View Related

Posting Date To Oracle

I'm trying to post a date value into an oracle 9i database, using classic asp, as that's the language existing app was written in, using the following code:

to_date('"&date()&"','DD-MMM-YYYY')

that's included in the insert statement, i keep getting the following error on the page:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Oracle][ODBC][Ora]ORA-01821: date format not recognized

any ideas? i checked the database type in the table, it's set to Date.

View Replies View Related

Retriving Oracle Date

I'm having hard time retrieving oracle date with the follwing sql statement using VBScript. MayDate Column is Date Type Code:

View Replies View Related

Problem Retriving Oracle Date

I get the following error message when I search for some fields stored in oracle database.

Microsoft OLE DB Provider for ODBC Drivers (0x80020009)
[Microsoft][ODBC driver for Oracle][Oracle]ORA-01861: literal does not match format string
/documenttracking_v3/ReportMain.asp

The script functions correctly using MSAccess and MS sql, when I moved to Oracle I keep getting Date format error messages eventhough The script includes a function that forces the date format I need. Code:

View Replies View Related

Change Oracle Date Format

I need to update an oracle database however, i must have the format
22 FEB 2004

Unfortunately i use a date picker(javascript) which returns 22/02/2004.
(this happens in client side)

How do i change the format to "22 feb 2004" in the server before inserting into the database ?

I already have
strdate1 = Request.Form("date1")

how do i change this date format ?

View Replies View Related

Problem With Date Format When Compared With Oracle

In oracle, I have a column which store date (with DAT type). The content will be like 11/08/2005 12:00:00. How can I get the exact date format in ASP?

View Replies View Related

Date Format From Asp Form To Oracle Database?

my database, sqlplus oracle, has a column ccexpiry, whch is set to date. In my form in asp, there will always be an error whenever i pass in a date that is not in the DD MMM YYYY which is the standard for oracle. My qn is how can i pass in a date that is in DD/MM/YYYY format? Code:

View Replies View Related

Date Formatting

i have a date in the following format: 12/1/2003

how do i reference just the 'day' portion of this date - in other words '1'

if the date was 12/10/2003, then i would just want the '10'

View Replies View Related

Date Formatting

I am trying to display dates in a spreadsheet, but the dates need to be in a
format that will allow them to be sorted in Excel. The datatype in the SQL
Server database is datetime. In this case, I need to display the date only,
not the time. But I don't want to change the datatype in the database
because the time is used in other places.

So what I am doing is pulling it out of the database, then modifying it in
ASP/VBScript by using the datevalue function. This results in values such as
3/31/2006, 4/3/2006, and 4/14/2006. The problem is, the ones with the
single digit date (4/3/2006 in the sample data I just listed) messes up
Excel's sorting capabilities. How can I force the dates to display in a
2-digit date format? It would probably be good to do the same for the month.

View Replies View Related

Date Formatting

does anybody know if you can change the format of
a date from the us version 10/20/04 to the european way
20/10/04?

View Replies View Related

Date Formatting

I currently am showing Todays date on the page as follows:
<%=Date()%>

I would like to show it in Day of Week, Month, Date, Year which normally I would
show like this: <%=FormatDateTime(rstemp("StrDate"),1)%> where StrDate is a date/time field name.I want to do something like that with <%=Date()%>. Is there a way to do this?I am also using this to show Tomrrow's date also:

<%=Date() + 1%>

Again, I also want to show the date the same way.

View Replies View Related

Date Formatting

I know I could write one, but is there a built-in VBScript/ASP function to take a date, which is in the format mm/dd/yyyy, and put it in a yymmdd format?

View Replies View Related

Formatting The Date In Asp

I've got ASP to display the date in the format mm/dd/yy - i'm assuming thats the default value for date(). how to format that so it is in the form dd/mm/yy ? Or is ASP just returning the date format from however it is configured on the web server?

View Replies View Related

Date Formatting

how can I format date that always return in fixed width. for example..

if the date is 1st jan, 2003..

it should return 01/01/2003 not 1/1/2003.i need date format always in 10 characters.

View Replies View Related

Formatting A Date

I have the following at the top of my page :

Session.LCID = 2057 'UK

which sets local date/currency settings to UK. But despite this, a date entered as "28/01/1999" and stored in Access as "28/01/1999" is displayed as "01/28/1999". I haven't a clue whats happening.

View Replies View Related

Date Formatting

I have a client that wants a time field to resolve to 7:00 PM rather
than 7:00:00 PM (wants the seconds gone). vbLongTime provides the
later but vbShortTime produces a 24 hour version or 19:00. Any
suggestions?

View Replies View Related

Date Formatting

How do I perform the VB : format(now,"yyyy-mm-dd") in vbscript. It seems not to like 'format' ..

View Replies View Related

Formatting The Date

I'm formatting the time that I'm storing. I'm trying to use:

riTimeIn = FormatDateTime(("timein"),3)

The problem is, since i'm using an insert i'm not using any recordset, so the code will not work. It will work like this (riTimeIn = FormatDateTime(rsdata("timein"),3) with the recordset. Do I just create a recordset.? Or is there away to get it to work without it?

View Replies View Related

Formatting The Date

I currently drag in a date stored as dd/mm/yy in my access database into a recordset and subsequently onto my asp page. What I want to do is format that string so that it returns to the html code dd.mm.yy - could somebody could help me out here?

View Replies View Related

Formatting Date

I have a question regarding the date format. I am using an Access database as the backend. In Access there are only two formats, short and long.

Is there anyway to display the long date but without the day of week spelt out? In other words, I want January 24, 2006 and NOT Tuesday, January 24, 2006.

View Replies View Related

Formatting The Date

I have a field in my mysql database that is configured as 'DATETIME' and '0000-00-00 00:00', which i populate using the 'NOW() function, this returns a date in the format

2004-09-18 22:08:26

I would like to have this displayed in my web page as

Tuesday, 18th September 2004 at 10:08 pm (or something very similar)

How would I go about doing this?

View Replies View Related

Date Formatting

The dates stored in my database are in dd/mmm/yyyy format but when it displays on the browser, it changed to mm/dd/yyyy format. Does anyone know what had went wrong??

View Replies View Related

Formatting Date Change How Can It Possible

I'm currently entering the date into my date field using the now()
function, which delivers this result: 2/2/2004 9:08:09 AM which is
fine for some cases.

However, when retreiving this result, sometimes I'd just like to pull
up the first part, such as the 2/2/2004 and cut out the rest. How do
I take this date output, and format it to show only what I want? I'm
writing all this in ASP.

View Replies View Related

Time/Date Formatting

I am having a little bit of trouble converting some time/date formatting.

I am retreiving it from an existing database we have (MS SQL) with
"SELECT * from table"

It is in this format "01/02/2005 13:31:00"
e.g. "DD/MM/YYYY HH:MM:SS"

I need to convert this to the format to YYYY-MM-DD e.g "2005-02-08"

Any suggestions would be appreciated. Perhaps some sort of more advanced sql query, or ASP scripting.

View Replies View Related

Custom Date Formatting In ASP

I would like to generate a custom date format for my ASP output ... i.e.: "5 Apr 06" instead of the "05 April 2006" that the British English 2057 LCID automatically gives me. In other words, I would like a 3 digit month and two digit year.

The code on my page reads as follows now ...

<%= DoDateTime((Recordset1.Fields.Item("StartDate").Value), 1, 2057) %>

View Replies View Related

Insert And Date Formatting

i am having with my classifieds ads site, i am using Access. I little info first: every ad that is posted automatically includes the date it was placed, and on the actual ad page it shows when the user posted the ad and when it will expire.

the script always displays all date formats as so: mm/dd/yy however after using the following code in my asp files: session.lcid = 2057 it formats all prevouis ads like this: dd/mm/yy and that is what i wanted. Now here comes to the problem after inserting the above code every new ad that is posted on the site still shows the mm/dd/yy (us format) and i do not understand why.

View Replies View Related

Date/Time Formatting Of Now()

how i can format a date/time field from an access db, so it displays the date followed by just the hours and minutes of the time and not the seconds. The information is stored in the db using Now() so it contains the date and the time. I want it to show dd/mm/yyyy hh:mm .

View Replies View Related

Formatting A Date Into Yyyymmdd

Is there a quick way to format a string in this format yyyymmdd in ASP / vbscript? I want this format because I want to pass the formatted date to a SQL Store procedure for a query on searching for date. The type of input could be something like 611974 (aka 6th January 1974) or 2091980 (aka 20th September 1980).

View Replies View Related

Formatting Date & Time In VbScript

I'm passing the current date and time to a DATETIME coloumn in my database and it's so far proved very finicky about what format it will accept. It seems to want it like so:

yyyy-mm-dd hh:mm:ss

I'm not sure but I think it will only accept the '24 hour' time. (Military time; ie. 17:58:23) The following line of code works and the database will accept it:

Code:

Year(Date) & "-" & Month(Date) & "-" & Day(date) & " " & FormatDateTime(Time,4) & ":" & Second(Time)

But it seems like an awful waste of declarations. Can anyone suggest a sleeker way of getting the date & time formatted so the database will accept it? Or if you're familiar with the MySQL DATETIME type, let me know the best acceptable way to pass this info.

View Replies View Related

Easy Date Formatting Question

I have a variable that represents a standard mm/dd/yyyy date , but i want to change it to just October 6

''''

datepart("m","d" , mydatevariable)

'''''

....doesnt work.

View Replies View Related







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