Hey,
I am geting TimeStamp "2008-06-18 10:34:51"from Oracle Table Field, but I want to compare it with a Date Field "2008-06-18", which does not have Time attached,
How can I convert and compare these two dates,
TimeStamp To Date Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 22
- Joined: Tue Mar 13, 2007 10:10 am
TimeStamp To Date Conversion
Quest Expert
-
- Participant
- Posts: 22
- Joined: Tue Mar 13, 2007 10:10 am
TimStamp to Date
Can you provide some more info. please
like what will be the Syntax?
like what will be the Syntax?
DSguru2B wrote:Extract everything before the first space from your timestamp using the FIELD() function and then compare.
Quest Expert
Compare the two directly as strings. Use the substring operator [] to hack off the first ten characters of the timestamp when you do:
Or Field().
Code: Select all
If Link.Timestamp[1,10] > Link.Date Then...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Re: TimStamp to Date
QuestExpert,QuestExpert wrote:Can you provide some more info. please
like what will be the Syntax?
DSguru2B wrote:Extract everything before the first space from your timestamp using the FIELD() function and then compare.
You should be having DataStage installed. Go to HELP and search Field() function. It is pretty straight forward!! You can also use Craig's solution too.
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted