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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Converting ddMONyyyy to a usable database format

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server

Any smart way to convert 19JUN2010 into a usable database date in SSIS?


If there's "Business Intelligence", there's bound to be "Business Stupidity".

View Complete Post

More Related Resource Links

Video: Converting Word Documents to PDF Format Using SharePoint Server 2010 and Word Services

Watch this visual how-to video as you learn how to programmatically convert Word documents to PDF format on the server by using Word Automation Services with SharePoint Server 2010. (Length: 6:15)

Insert DATE to database (format 'YYYY-MM-DD')

How can I insert BIRTHDATE into column in 'YYYY-MM-DD' format. This is my code, can anyone edit my code? Tnx String = "INSERT into concfile VALUES(BIRTHDATE('" & DateTimePicker1.Text & "', 'YYYY-MM-DD'))"

Displaying Image stored in rtf format in access database displaying it on crystal report

Hello, I'm working on a C# project combined with "Crystal Reports 10". When a user inserts something in a "TextField" in my C#-Program, it's saved  as RTF-code (Bolt,Pictures,Underlined,....) to a database.. So if they  reopen it in my "C#"-program they're able to see what they've entered  including their pictures .... But when I created a "Crystal Report"-file and combined it with the same  database used in my "C#"-program, it only show the formatted text and not  the pictures or images... Is there a way to show the "Picture" or "Image" they've inserted in RTF-code  ??? When I copy the code from the database in a simple Text-File and rename  it too "Test.rtf", it wil open correctly in word (with picture and  everything else)... So I hope there is a way to get the picture, Cz it's rather important  they've got a picture of the product they wanna print ...

convert date to mmddyy format before submit to database

Dear all,   Could anyone pls guide me on how to convert date in textbox which is in format(dd/mm/yy) to mmddyy before submit to database.    

converting date format from (Wed 1 Sep) to (2010-09-1)

Hi All,  I have a data in the excel file and I need to import the data into sqlserver. I can do this bit by importing data into a temporary table and then from that temp table to import/insert into my required table. its works fine. The problem I have, in the excel file I have a one column showing date's (format: e.g. Wed 1 Sep) and I am having a difficulty to import that column. The format of the date is bit different than the normal date. It works fine with the normal/standard date format. In my file i have a date format is  Wed 1 Sep and I need to convert this format to 2010-09-01. Although, year is missing but I can add this manually at the time of convert or just about before to convert.  Any suggestion are welcome or if you know any good way to import data from excel to sqlserver please share.  thanks for your help. Regards, Athar

string not converting in datetime format


hi to all,

 i'm developing a website. i have a registration form where user can registered with this website.

this have a birthdate field for store user's birthdate.that is a textbox.

here is my code.

protected void submitbtn_Click(object sender, ImageClickEventArgs e)
System.Globalization.CultureInfo en = new System.Globalization.CultureInfo("en-GB");
li.fname = firstname.Text;
li.lname = lastname.Text;
li.gender = gender.SelectedItem.Text;
li.date = Convert.ToDateTime(birthdate.Text,en); //getting error here
li.address = addrs.Text;
li.contactno = contno.Text;
li.countryid =Convert.ToInt32( dropcontry.SelectedValue);
li.stateid = Convert.ToInt32( dropstate.SelectedValue);
li.cityid =Convert.ToInt32( dropcity.SelectedValue);
li.emailid = prmrmailid.Text;
li.username = createuserid.Text;
li.password = createpassword.Text;
li.secutityque = dropsecque.SelectedItem.Text;
li.securityans = secanswer.Text;

int a = li.personid;
li.personid= a;
int p = li.personid;

Converting .DAT file to sql database


Hi All....

   My client gave me .DAT database file. But I am not know how to use it or how to attach it to the sql server. So please help me so that I can use this .DAT file.

Thanks in advance...

Reporting Services Error-The version of the report server database is either in a format that is not


 Hi,I have Configured All Reporting SErvices Through Rep Serv Configuration Wizard


When I type 


on top of Address Bar Of Browser I Am Gettin This Error

  • The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights. (rsInvalidReportServerDatabase)
PLease Help Me


Converting datetime to var``char without changing the format


Hi Team,

Is there a way to change the datetime to varchar without changing the format

like datetime '2009-09-28 00:00:00.000' after converting to varchar it should be in the same format



Problem converting varchar values to numeric format for comparison


I've got an SQL-2008 database containing our network inventory (it's from LanSweeper - a low-end and very recommendable network management tool). In a table are all logins with the IP-address of that moment, where the IP-address is defined as VARCHAR(15).

I need to compare IP addresses with those in the table defining the IP segments, where the segment addresses are also defined as VARCHAR(15).

In order to be able to compare reliably, I need to convert the addresses to numeric format. I cooked up the following SELECT statement for that:

SELECT TOP (100) PERCENT Ipaddress, (
CAST(SUBSTRING(Ipaddress, 1, CHARINDEX('.', Ipaddress, 1) - 1) AS DEC) * 1000000000 +
CAST(SUBSTRING(Ipaddress, CHARINDEX('.', Ipaddress, 1) + 1, CHARINDEX('.', Ipaddress, CHARINDEX('.', Ipaddress, 1) + 1) - 1) AS DEC) * 1000000) +
CAST(SUBSTRING(Ipaddress, CHARINDEX('.', Ipaddress, CHARINDEX('.', Ipaddress, 1) + 1) + 1, CHARINDEX('.', Ipaddress, CHARINDEX('.', Ipaddress, CHARINDEX('.', Ipaddress, 1) + 1) + 1) - 1) AS DEC) * 1000 +
CAST(SUBSTRING(Ipaddress, CHARINDEX('.', Ipaddress, CHARINDEX('.', Ipaddress, CHARINDEX('.', Ipaddress, 1) + 1) + 1) + 1, 3) AS DEC) AS IP, Computername, logontime, Username, ADsite,
FROM dbo.tblCPlogoninfo

Converting daily snapshots into format for time series analysis


I wasn't sure if this was an app question or a database question, so I'll start here first ...

Desired End State:
I'd like a process/app/database/whatever that converts daily inventory snapshots into one or two tables for easy analysis over time. Ideally, I'd like the solution to be efficient, flexible, and resource-sensitive.

What is the best way to go about this?

Current State/Background:
I'm working with a vendor who sends me daily Excel sheets with assets under management. The reports are based a snapshot of master records from the inventory system. For discussion, let's say a sample looks like this:

AssetID, Serial#, Status
123456, ABC123, Deployed
365494, D2-F39, Retired
B63489, 123GR2, Pending

The inventory is mostly static. Of the 40K rows in the spreadsheet, only 20 or so change from day-to-day. Further, once an asset is retired, its record never changes again.

Because they're complete snapshots of the master data, the spreadsheets are massive (over 40K rows, currently around 40 MB each). This makes them awkward to work with.

I have two main business requirements:
1) From today's spreadsheet, I need an easy way to identify the 20 rows that changed yesterday.
2) For a specific asset, I need to trac

Business Data List web part, format field from database as hyperlink


I have a BDC with an entity that selects fields from a table. One of the fields is the full pathname to a file, or it could be a hyperlink.
When I display the entity in a Business Data List Web Part, all fields are displayed as text, without any formatting. I know the formatting can be modified using the XSL editor (under modify web part), I have found a sample with date-time format . Some basic formatting can also be done with de sharePoint designer, but nowhere have I found an example that allows me to format the column with the link as a clickable hyperlink.
My strong points are sql server and .net , but not XSL , can anyone give me an example of how th eformatting needs to be done in XSL?

tnx in advance

Jan D'Hondt - Database and .NET development

Is realtime SQL Server Replicated database usable realtime (not offline / single user mode)


Is SQL Server replicated (destination) database replicated by SQL Server Replication fully usable? Meaning it's not just for Disaster Recovery but is fully usable from various say BI / Reporting purposes.

In the essence it is exactly same as other replication engines and the destination database is very much usable and not just offline / single user mode.



SFTP is converting text file format, now SSIS sees an empty file


Using BIDS that came with SQL Server 2008 R2, I created a text file import package.  I used files generated from my local machine for local testing.  However, I find that these files get their format changed after being SFTP'd to the data warehouse.  Not being able to visually see a problem with the text file to be imported, I copied it down to my local machine and compared to one generated at my machine.  Not until I chose "Show All Characters" in Notepad++ did I see the difference: my local file ends its lines with a carriage return-linefeed character, whereas the file that went through SFTP ends its lines with a linefeed character only.

I suspect there's something very basic going on here that I don't know.  I won't ask anybody to explain it, but I'm wondering if there's some way I can import both file formats.  The column numbers and lengths are identical, it's the just line ending character that's different and causing zero rows to get imported.  The only other thing I know to do is recreate my flat file connection, and I haven't even tried that yet.


Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.
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