MattRichardsUK
Technical User
I have a field in a table that is made up of 7 Digits made up to represent a date.
eg.
1001212 = 12 Dec 2000
the first 3 digits are for the year but 100 = 2000, 101 = 2001 and so on.
the next two are the month and the next the day
I,m trying to write a formula to convert the field into a recogniseable format for report purposes.
eg 1001212 into 12 Dec 2000
I have written the following formula but when I try and check it seagate throws back an error message saying that the remaining text does not appear to be part of the formula
is this because I have to do this kind of conversion in seperate formulas. or is there an obvious error that I have over looked.
Mattrichardsuk
Select TempYearStore[2 to 3]
Case "00" : Years := 2000
Case "01" : Years := 2001
Case "02" : Years := 2002
Case "03" : Years := 2003
Case "04" : Years := 2004
Case "05" : Years := 2005
Case "06" : Years := 2006
Case "07" : Years := 2007
Case "08" : Years := 2008
Case "09" : Years := 2009
Case "10" : Years := 2010; <<Formula bombs out here
Select TempMonthStore[4 to 5]
Case "01" : Months := 01
Case "02" : Months := 02
Case "03" : Months := 03
Case "04" : Months := 04
Case "05" : Months := 05
Case "06" : Months := 06
Case "07" : Months := 07
Case "08" : Months := 08
Case "09" : Months := 09
Case "10" : Months := 10
Case "11" : Months := 11
Case "12" : Months := 12;
Select TempDayStore[6 to 7]
Case "01" : Days := 01
Case "02" : Days := 02
Case "03" : Days := 03
Case "04" : Days := 04
Case "05" : Days := 05
Case "06" : Days := 06
Case "07" : Days := 07
Case "08" : Days := 08
Case "09" : Days := 09
Case "10" : Days := 10
Case "11" : Days := 11
Case "12" : Days := 12
Case "13" : Days := 13
Case "14" : Days := 14
Case "15" : Days := 15
Case "16" : Days := 16
Case "17" : Days := 17
Case "18" : Days := 18
Case "19" : Days := 19
Case "20" : Days := 20
Case "21" : Days := 21
Case "22" : Days := 22
Case "23" : Days := 23
Case "24" : Days := 24
Case "25" : Days := 25
Case "26" : Days := 26
Case "27" : Days := 27
Case "28" : Days := 28
Case "29" : Days := 29
Case "30" : Days := 30
Case "31" : Days := 31;
Date (Years,Months,Days);
eg.
1001212 = 12 Dec 2000
the first 3 digits are for the year but 100 = 2000, 101 = 2001 and so on.
the next two are the month and the next the day
I,m trying to write a formula to convert the field into a recogniseable format for report purposes.
eg 1001212 into 12 Dec 2000
I have written the following formula but when I try and check it seagate throws back an error message saying that the remaining text does not appear to be part of the formula
is this because I have to do this kind of conversion in seperate formulas. or is there an obvious error that I have over looked.
Mattrichardsuk
Select TempYearStore[2 to 3]
Case "00" : Years := 2000
Case "01" : Years := 2001
Case "02" : Years := 2002
Case "03" : Years := 2003
Case "04" : Years := 2004
Case "05" : Years := 2005
Case "06" : Years := 2006
Case "07" : Years := 2007
Case "08" : Years := 2008
Case "09" : Years := 2009
Case "10" : Years := 2010; <<Formula bombs out here
Select TempMonthStore[4 to 5]
Case "01" : Months := 01
Case "02" : Months := 02
Case "03" : Months := 03
Case "04" : Months := 04
Case "05" : Months := 05
Case "06" : Months := 06
Case "07" : Months := 07
Case "08" : Months := 08
Case "09" : Months := 09
Case "10" : Months := 10
Case "11" : Months := 11
Case "12" : Months := 12;
Select TempDayStore[6 to 7]
Case "01" : Days := 01
Case "02" : Days := 02
Case "03" : Days := 03
Case "04" : Days := 04
Case "05" : Days := 05
Case "06" : Days := 06
Case "07" : Days := 07
Case "08" : Days := 08
Case "09" : Days := 09
Case "10" : Days := 10
Case "11" : Days := 11
Case "12" : Days := 12
Case "13" : Days := 13
Case "14" : Days := 14
Case "15" : Days := 15
Case "16" : Days := 16
Case "17" : Days := 17
Case "18" : Days := 18
Case "19" : Days := 19
Case "20" : Days := 20
Case "21" : Days := 21
Case "22" : Days := 22
Case "23" : Days := 23
Case "24" : Days := 24
Case "25" : Days := 25
Case "26" : Days := 26
Case "27" : Days := 27
Case "28" : Days := 28
Case "29" : Days := 29
Case "30" : Days := 30
Case "31" : Days := 31;
Date (Years,Months,Days);