Friday, March 30, 2012
Need Help ASAP! FoxPro to MSSQL 2000 Conversion question..
It appears that FoxPro 2.6 stores it's null value dates as 12:00:00 AM which is causing errors when importing the data into MSSQL 2000.
The format of all of the other dates is mm/dd/yyyy
Has anyone else encountered this? is there a filter, or a a script or switch somewhere to replace the NULL values with something that MSSQL is happier with?
..:: EDIT ::..
Looking @. the properties of the affected columns, it looks like they are set as smalldatetime, but if i switch them to datetime with a length of 8 it imports just fine.
So.. now my task is to update all of the columns from smalldatetime to datetime.
sugggestions?
Thanks in advance!
Joe..::bump::..
anyone?|||Use DTS.sql
Friday, March 23, 2012
Need expression help ASAP
I have a report in ssrs where it has a colum with dates in it I has and other colum with either a $0.00 amount or and amount paid. I need a colum which which calculates only the number of days from the date colum that when the other colum =0 it gives me the total number of days. VS.net SQL 2005 SSRS C#
example of what needed:
Invoice amount | Date of Invoice| Amount received | number days past due
$100.00 06/01/2007 0.00 18 days ( this is what I need)
can some one explain.
Here are my expressions
FormatCurrency(Fields!Grossamtbilled.value)
FormatDateTime(Fields!EXPR1.Value,2)
FormatCurrency(Fields!RCVAMOUNT.Value)
I'm not sure what expression you would use when creating a report, but it would be fairly easy to do it in the original SQL Statement (by using a mixture of the CASE and DateDiff functions).
sqlMonday, February 20, 2012
Nb Months between 2 dates (one in DB2 format)
between the current_timestamp
an a date in the DB2 format ?
DateDB2 Char(26) = 2000-12-30-12.55.30.123456
DateSQL = GetDate() or Current_Timestampdatediff (mm,convert (datetime , substring(datedb2,1,10)),DateSQL )|||nope,
I've tried that sort of conversion but it seems
that the CONVERT(DateTime,...) function inverts
the month and the day
Convert(DateTime,'2000-12-30') >>> doesn't work !!!
Convert(DateTime,'2000-30-12') >>> works !!!
Is '2000-30-12' a standard English-Format-Date ?|||Convert(DateTime,'2000-12-30') >>> doesn't work !!!
Then try this >>> select Convert(DateTime,'2000-12-30',120)|||Thank you very much Enigma !