No suggestions from anyone, it works just like it is supposed to.info_ds wrote:hi ray,
i tried and got the result --> 19950512
any suggestions?
Timestamp conversion
Moderators: chulett, rschirm, roy
That is certainly simple enough. I didnt think of that.hi lance,
mydate= 'May 12 1995 12:00:00.000 AM'
DateToString(StringToDate(mydate[1,11],"%mmm %dd %yyyy"),"%yyyy%mm%dd")
can we implement this way?
One thing to keep in mind. It was noted in a previous post that if the DAY is "1" instead of "01" then the Date functions do not work properly.
Works! -->mydate= 'May 01 1995 12:00:00.000 AM'
Doesnt Work! -->mydate= 'May 1 1995 12:00:00.000 AM'
Lance Short
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
Ray wrote:
btw: how do you find this stuff?
....did you read the manual cover to cover?![Smile :-)](./images/smilies/icon_smile.gif)
"Ray reads the manual so we wont have too." LOL
You're 'The Man!'
Thanks for the tip. Very cool. Kinda like locate() function on server side.Lance,
Check out the lookup_int16_from_string operator in the Modify stage
Page 27-9 of Parallel Job Developer's Guide for v7.x
btw: how do you find this stuff?
....did you read the manual cover to cover?
![Smile :-)](./images/smilies/icon_smile.gif)
"Ray reads the manual so we wont have too." LOL
![Laughing :lol:](./images/smilies/icon_lol.gif)
You're 'The Man!'
Lance Short
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's probably true that I read the manuals and readme files more thoroughly than most; that's because I have to be prepared to teach this stuff, and answer questions (or at least know where to look). Being able to quote page numbers impresses folk, too. ![Cool 8)](./images/smilies/icon_cool.gif)
![Cool 8)](./images/smilies/icon_cool.gif)
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.
works
Code: Select all
Doesnt Work! -->mydate= 'May 1 1995 12:00:00.000 AM'
Code: Select all
DateToString(StringToDate(mydate[1,11],"%mmm %dd %yyyy"),"%yyyy%mm%dd") on the converted datecolumn
Sree
Problem with timeatamp
i used the same code mentioned by INFO_DS
(
it is working fine on soalris machine.But when imoved the same code to Pre production environement (HP-UNIX) i am getting the following error
Item #: 4
does anyone encountered this error
(
Code: Select all
mydate= 'May 12 1995 12:00:00.000 AM'
DateToString(StringToDate(mydate[1,11],"%mmm %dd %yyyy"),"%yyyy%mm%dd"))
Item #: 4
Code: Select all
Event ID: 3
Timestamp: 2005-06-28 00:16:02
Type: Info
User Name: dsadm
Message: Advanced runtime options used: -default_timestamp_format "%yyyy-%mm-%dd\u %hh:%nn:%ss"
Item #: 7
Event ID: 6
Timestamp: 2005-06-28 00:16:03
Type: Fatal
User Name: dsadm
Message: main_program: When unescaping string %yyyy-%mm-%dd\u and error occured.
Sree
Re: yeah i also tried out and is working fine thanks guys.
Hi,
Can we use ICONV and OCONV for these date conversions???
if the data is Jan 12 1995
then the result would be
ICONV("12 Jan 1995","D4-DMY[2,A3,4"]>=0
OCONV(0,"D4 YDM[4,2,2]">= 1995 1 12
Hope this helps.
Lalitha
Can we use ICONV and OCONV for these date conversions???
if the data is Jan 12 1995
then the result would be
ICONV("12 Jan 1995","D4-DMY[2,A3,4"]>=0
OCONV(0,"D4 YDM[4,2,2]">= 1995 1 12
Hope this helps.
Lalitha
Lalitha
Re: yeah i also tried out and is working fine thanks guys.
ICONV and OCONV are used in server jobs not in parallel jobsLali_swam wrote:Hi,
Can we use ICONV and OCONV for these date conversions???
if the data is Jan 12 1995
then the result would be
ICONV("12 Jan 1995","D4-DMY[2,A3,4"]>=0
OCONV(0,"D4 YDM[4,2,2]">= 1995 1 12
Hope this helps.
Lalitha
Sree
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: