i have requirement like based on the input parameter(date) in to sequential file field data type Numeric. In the Numeric field length is 8. Output of sequential file is giving date and ending with period(.). like (2005-12-21.).I am using logic to converting that field is DateToString(inputparameter,"%yyyy%mm%dd"). so please suggest me to avoid period with in the date in the numeric field.
Thanks,
reddy.
Problem while conveting input parameter(date format)
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 10
- Joined: Wed Nov 30, 2005 8:12 am
Reddy,
the value "2005-12-21." cannot be stored in a numeric field, so there is no answer to the question as you have posed it. The DateToString() function you posted will convert a valid date into a 8 character long fixed representation without any separators, i.e. "20051221" and no decimal point. Are you certain that your input value is not in reality a string - i.e. if you write to a sequential file without using the DateToString() function what values are displayed?
the value "2005-12-21." cannot be stored in a numeric field, so there is no answer to the question as you have posed it. The DateToString() function you posted will convert a valid date into a 8 character long fixed representation without any separators, i.e. "20051221" and no decimal point. Are you certain that your input value is not in reality a string - i.e. if you write to a sequential file without using the DateToString() function what values are displayed?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 10
- Joined: Wed Nov 30, 2005 8:12 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Depends.
2005-12-21 can be stored as 1972, the result of the arithmetic expression.
It's less likely to happen accidentally in parallel jobs, of course, than in server jobs, due to more stringent enforcement of data types.
2005-12-21 can be stored as 1972, the result of the arithmetic expression.
It's less likely to happen accidentally in parallel jobs, of course, than in server jobs, due to more stringent enforcement of data types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.