Extract Date and Time from TimeStamp Column
Posted: Mon Jan 13, 2014 12:31 pm
Hi,
I have a requirement where I need to Extract the "Date" and "Time" Value from timestamps column..
Column "C" is Defined DataType as TimeStamp and has value as "2013-09-21 21:22:22" I need to get Date in Column "A" (DataType = Date) and Time in Column "B" (DataType = Time).
This is what I did :
A = field(C," ",1) = 2012-09-21
B = field(C," ",2) = 21:22:22
I am able to populate Column "A" and "B" with respective Date and Time Value as mentioned above. "
The value coming in "A" is a sting and is successfully getting populated to Date Column "A". I can convert the Sting to Date by using "StingtoDate" function as well and same I can do for Time Column "B"
My question is that is this the best approach and will give optimal performance and will not cause any issue or I can use other method or function to do this.... I am doing this is DS8.1...
I would appreciate, if somebody can advise on this....
I have a requirement where I need to Extract the "Date" and "Time" Value from timestamps column..
Column "C" is Defined DataType as TimeStamp and has value as "2013-09-21 21:22:22" I need to get Date in Column "A" (DataType = Date) and Time in Column "B" (DataType = Time).
This is what I did :
A = field(C," ",1) = 2012-09-21
B = field(C," ",2) = 21:22:22
I am able to populate Column "A" and "B" with respective Date and Time Value as mentioned above. "
The value coming in "A" is a sting and is successfully getting populated to Date Column "A". I can convert the Sting to Date by using "StingtoDate" function as well and same I can do for Time Column "B"
My question is that is this the best approach and will give optimal performance and will not cause any issue or I can use other method or function to do this.... I am doing this is DS8.1...
I would appreciate, if somebody can advise on this....