Fatal Error: Invalid time
Moderators: chulett, rschirm, roy
Fatal Error: Invalid time
Hi to everyone,
is there a way to check if an input is a date in a transformer stage?
tks
is there a way to check if an input is a date in a transformer stage?
tks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Only if the source data type is a string of some kind.
If the source data type is Date, then theoretically it can't be invalid unless it has more fractional seconds than are specified in your metadata, or is not constructed using the format specified in your metadata.
If the source data type is Date, then theoretically it can't be invalid unless it has more fractional seconds than are specified in your metadata, or is not constructed using the format specified in your metadata.
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.
I believe that the IsValidDate() only accepts the system default date format, if the string is different then IsValid('date',In.DateColumn,'%yyyy-%mm-%dd') would work, assuming your date format is 9999-12-31.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
We know. But there's plenty of information you can see, didn't any of it help? Let us know if you still have any specific questions... and I'm still wondering why your subject says "Invalid Time" and then you asked how to validate a date. Are you actually wondering how to validate a timestamp?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
What version are you on? Regardless - did you check the documentation for IsValid? It is multi-purpose as you might gather from the name:
There's more in the docs. Give that a shot.The IsValid() documentation wrote:Returns whether the given string is valid for the given type. Valid types are "date", "decimal", "dfloat", "sfloat", "int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "raw", "string", "time", "timestamp", "ustring".
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers