September 25, 2007, 05:23 AM
hitenChange Data Format from YYMD to DADMY
I am extracting data from a table where the date format is YYMD, I would like to set the format in the target table to DADMY and am having trouble setting this to work in the console.
I have tried different expressions within the Column Selection but this has not worked. I think it maybe a syntactical error?
Does anyone have any ideas?
Thanks for any help anyone can provide.
Hiten
Data Management Console V7.6.1 working with msSQL2005 database.
September 25, 2007, 11:03 AM
Leahquote:
to DADMY
Not familiar with that format; what is it?
September 26, 2007, 05:27 AM
hitenHi sorry that is a function.
I would like to change the date from YYMD to DMYY.
Thanks
September 26, 2007, 06:17 AM
FrankDutchHiten
Why do want to change the date to DMYY?
A YYMD format is much easier to handle and whenever you need an other format in a report you can convert it.
But if you insist there are several formulas depending on the actual format you have.
Is it a smart date, a string or an number.
September 28, 2007, 04:33 AM
hitenWe are trying to return the max date record, and are getting the incorrect record being returned. Therefore we were wanting to see if it would make a difference if the date format was changed.
September 28, 2007, 06:01 AM
FrankDutchIn webfocus you can say
TABLE FILE whatever
PRINT MAX DATE
END
If the DATE is a real date field in the database you will get the proper value.
If it is just a number or string looking as a date, it will be important what format it has.
Suppose DMYY: 13112007 and 14092006, the max value of these two "numbers" is 14092006 but that is not the max date.
suppose YYMD: 20071213 and 20060914 will give the correct number.
I'm not sure if the max date is working in ETL. If not you can run the fex and put the output in an amper value that can be used.
"where DATE = &MAXDATE"