Hi,
I need to check for last updated datetime of the table, for incremental upload.
Vindy
how do i check for the last updated datetime in a job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I already have a job that checks using a routine the maxdatetime value, but it throws 'literal not in the format' error.
I tried like this :
say DtTime = '10-03-2006 08:15:25'
Dt = Left(Time, 10)
Tm = Right(DtTime, 12)
D1 = OCONV(ICONV(Dt, "D/DMY"), "D/MDY[2,2,4]")
T1 = OCONV(ICONV(Tm, "MTS"), "MTHS")
Ans = D1:" ":T1
when i test the output it from the routine it shows the date and time...but when i run it thru Director it throws error. also how do i initialize current server DateTime...is there any system variable available.
Advance thanks,
Vindy
I tried like this :
say DtTime = '10-03-2006 08:15:25'
Dt = Left(Time, 10)
Tm = Right(DtTime, 12)
D1 = OCONV(ICONV(Dt, "D/DMY"), "D/MDY[2,2,4]")
T1 = OCONV(ICONV(Tm, "MTS"), "MTHS")
Ans = D1:" ":T1
when i test the output it from the routine it shows the date and time...but when i run it thru Director it throws error. also how do i initialize current server DateTime...is there any system variable available.
Advance thanks,
Vindy
-
- Premium Member
- Posts: 503
- Joined: Wed Jun 29, 2005 8:14 am
Check the online Help index for System Variables - they are there. You'll find things like @DATE and @TIME plus references to functions like Date(), Time() and TimeDate() off the top of my head. See which would work best for you.bgs_vb wrote:...is there any system variable available.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Instead of Tm = Right(DtTime, 12) you need Tm = Right(DtTime,bgs_vb wrote:I already have a job that checks using a routine the maxdatetime value, but it throws 'literal not in the format' error.
I tried like this :
say DtTime = '10-03-2006 08:15:25'
Dt = Left(Time, 10)
Tm = Right(DtTime, 12)
D1 = OCONV(ICONV(Dt, "D/DMY"), "D/MDY[2,2,4]")
T1 = OCONV(ICONV(Tm, "MTS"), "MTHS")
Ans = D1:" ":T1
when i test the output it from the routine it shows the date and time...but when i run it thru Director it throws error. also how do i initialize current server DateTime...is there any system variable available.
Advance thanks,
Vindy
![Cool 8)](./images/smilies/icon_cool.gif)
Only the rightmost 8 characters of the timestamp are the time component.
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.