.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

date not save in oracle databse

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :ASP.Net
 

here is my function

Public Shared Function GetData(ByVal strQuery As String) As DataTable
        Dim dt As New DataTable
        Dim cmd As New OracleCommand(strQuery, conn)
        cmd.CommandType = CommandType.Text
        Try
            conn.Open()
            da.SelectCommand = cmd
            da.Fill(dt)
        Catch ex As Exception
            Return dt
        Finally
            conn.Close()
            cmd.Dispose()
            da.Dispose()
        End Try
        Return dt
    End Function


here im calling above GetData function

 Protected Sub ImageButton


View Complete Post


More Related Resource Links

how i can calculate date difference in oracle

  
how i can calculate the date diff in Oracle 10g using pl sql developer 7thank you

What is causing oracle datbase table failing to save inserted Record permenantly?

  

I have a table in orcale database where I am inserting records. I am able to insert a record in a table but it is not being saved permenantly.When inserting there is no error. what could be causing this?


how to save and retrive date in database using jquery ajex asp.net ,JSOn,XML,HTML

  

how to save and retrive  date in database using  jquery ajex asp.net ,JSOn,XML


Save data from KML into PostgreSQL databse and create KML from PostgreSQL data

  

Hi all,

I am working on a ASP.NET application which utilizes google maps. Now, I have a requirement where I need to store data (e.g. Id, Name, Address, Lat, Long,  description etc.) of place marks from a KML file into a Postgres database. Also, I need to be able to write a KML file by readings similar data from databse.

Has any one worked on such requirement ? It will be great if one can provide sample code.

Thanks in advance for your help.


Cheers,

Geet


date format conversion from oracle to sql using SSIS

  

HEllo friends

I am migration oracle tables to sql using SSIS. While doing this i am trying to use Derived column transfrom to convert Date format in oracle to sql. But i do not have any clue that how should i use this. In oracle side date is in mm/dd/yy format and in sql i want that in yy/mm/dd format. 

Please give me directions ASAP?

Thanks in advance


dimrd_SQL

Excel Date Field Import Problem in Oracle SQL Developer

  

Hi All,

I have an Excel file (which has data imported from Oracle 10G Database) one of the fields is a Date Filed which has values like 28-JAN-11 03.25.11.000000000 PM ( Date field is Oracle Time Stamp(6) in Database )

When I am trying to Import the same Excel file from another Oracle 10 G database (for another database/application), I get an error because the data field is not being recognized by Oracle 10G --> Import is being done by ORACLE SQL Developer (Table (field) has TIMESTAMP(6) as the datatype)

How can I import that field ?? For time being I made the TIMESTAMP to VARCHAR2 and its working but I could not convert that to Date field again in C# CODE ( it says not a valid date type).


Excel Date Field Import Problem in Oracle SQL Developer

  

Hi All,

I have an Excel file (which has data imported from Oracle 10G Database) one of the fields is a Date Filed which has values like 28-JAN-11 03.25.11.000000000 PM ( Date field is Oracle Time Stamp(6) in Database )

When I am trying to Import that Excel file from another Oracle 10 G database (for another database/application), I get an error because the data field is not being recognized by Oracle 10G --> Import is being done by ORACLE SQL Developer (Table (field) has TIMESTAMP(6) as the datatype)

How can I import that field ?? For time being I made the TIMESTAMP to VARCHAR2 and its working but I could not convert that to Date field again in C# CODE ( it says not a valid date type).

 


Using a CompareValidator to check input is a valid date

  
The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

How To Set a Date Format In GridView Using ASP.NET 2.0

  
A very common desire is to set a column of a gridview to display just the month, day and year of a DateTime type. The problem is the by default, the HtmlEncode property of the boundfield attribute (
The problem is that if this field is enabled, you can not pass format information to the boundfield control. That is, if you try the following code, you will not get the desired result.

jQuery Date picker Implementation in ASP.NET

  
I've posted a wrapper ASP.NET around the jQuery.UI Datepickercontrol. This small client side calendar control is compact, looks nice and is very easy to use and I've added it some time back to my control library.

This is primarily an update for the jQuery.ui version, and so I spend a few hours or so cleaning it up which wasn't as easy as it could have been since the API has changed quite drastically from Marc's original implementation. The biggest changes have to do with the theming integration and the resulting explosion of related resources.

If you want to use this component you can check it out a sample and the code here:

How to format datetime & date with century?

  
Execute the following Microsoft SQL Server T-SQL datetime, date and time formatting scripts in Management Studio Query Editor to demonstrate the usage of the multitude of temporal data formats available and the application of date / datetime functions.

http://www.sqlusa.com/bestpractices2005/centurydateformat/

Date and Time Functions in SQLSERVER

  
Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
4 GETDATE and GETUTCDATE Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Data Types - Date and Time in SqlServer

  
Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

Built-in Functions - Date and Time Functions

  
Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

Essential SQL Server Date, Time and DateTime Functions

  
The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.

Date/Time Conversions Using SQL Server

  
There are many instances when dates and times don't show up at your doorstep in the format you'd like it to be, nor does the output of a query fit the needs of the people viewing it. One option is to format the data in the application itself. Another option is to use the built-in functions SQL Server provides to format the date string for you.

Date and Time Data Types and Functions

  
The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend