Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am looking for a solution in mapping Sybase date field to sql server date field.
I am using biztalk mapper to map two schemas. Input schema takes data from sybase and outputs in to
sql server 2008. Trying to map the date fields in the map. The issue to take the date field from sybase and map it to sql server using scripting functoid with c#. The script is
pubilc string getdate(Datetime mydate)
{
string sqldate = mydate.ToString();
DateTime dt = DateTime.Parse(sqldate);
sqldate = dt.ToString();
return sqldate;
}
Here I am getting an error saying that a string cannot be converted to DateTime.
Any help on this issue.
Thanks
Moh
Posted
Updated 11-Nov-10 16:16pm
v2

1 solution

Debug your code to see if you are actually getting the string in proper DateTime format. You might want to try using TryParse() instead of Parse().
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900