October 21, 2008 at 12:51 pm
Hi All,
I am using the following code to find whether the given date is in MM/DD/YYYY format
If Date.TryParseExact(Row.StartDate.ToString, "mm/DD/yyyy", Nothing, Globalization.DateTimeStyles.AllowWhiteSpaces, lclDt) Then.
It works fine if the DD is less than 10 (1-9) otherwise throws invalid date.
I am new to SSIS. I just played around with parameters but could not succeed.
Please let me know what chnages I need to make this to work.
Thanks in Advance.
-Srinath
October 23, 2008 at 9:55 am
Can anybody help me please!!!
October 23, 2008 at 10:10 am
I found this thread, http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/025aefef-e7ba-4fd4-b4a8-00925d9bee34/ and it looks like you need to change your data format to "MM/dd/yyyy".
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 24, 2008 at 10:30 am
Hi Jack Corbett,
Many Thanks for your reply
I have tried that option as well but no luck
it does not convert properly when the date is less than 10(i.e single digit)
Thnaks,
-Srinath
October 24, 2008 at 11:03 am
If you have data that has single digit months or days 1 instead 01 etc... you need to use this format:
"M/d/yyyy"
This will work with either 1/1/1970 or 01/01/1970 or 1/01/1970 or 01/1/1970.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
November 7, 2008 at 2:07 pm
Hi Jack Corbett,
Thanks a lot it is working fine.
Sorry for replying late, I was on vacation.
Regards,
-Srinath
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply