Hi,
I have a date formating issue. The below stage validation returns correctly (Else part) if the PeriodNum is in double digit i.e. say 10152004
In the 'Else' part if the LNK1.periodNum is 3 then it should return 03152004 instead of 3152004
IF(LNK1.TRANSACTIONTYPE = '100' ) Then '1215' : (LNK1.Year - 1)
Else
LNK1.PeriodNum : '15' : LNK2.Year
Without going for OConv is there any other logic.
Thanks in Advance
Badri
Formating issue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 81
- Joined: Wed Jul 14, 2004 3:18 am
- Location: Johannesburg, South Africa
- Contact:
Just check if it needs a leading zero:
Code: Select all
IF(LNK1.TRANSACTIONTYPE = '100' ) Then '1215' : (LNK1.Year - 1)
Else
If LNK1.PeriodNum < 10 Then
'0' : LNK1.PeriodNum : '15' : LNK2.Year
Else
LNK1.PeriodNum : '15' : LNK2.Year
Morney le Roux
There are only 10 kinds of people: Those who understand binary and those who don't.
There are only 10 kinds of people: Those who understand binary and those who don't.
As mentioned - format the output:
Note, the syntax is off the top of my head first thing in the morning, pre-coffee. It should be pretty darn close.
Code: Select all
IF(LNK1.TRANSACTIONTYPE = '100' ) Then '1215' : (LNK1.Year - 1)
Else
FMT(LNK1.PeriodNum:'15':LNK2.Year,"8'0'R")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers