Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
There is a small issue i am facing ,while Adding few hours to my "CREATEDDATETIME" field .
I need to make a new field which will have few hours added to old field , for example i need to add 5:1/2 hours.
When i add them in Text Object and select a date it shows desired result , but when i put the expression at back end script , i get blank field.
Format of my "CREATEDDATETIME" field : '3/31/2010 9:09:24 AM '
Function i am using on text object : date(date(date#(CREATEDDATETIME,'MM/DD/YYYY hh:mm:ss tt'), 'MM/DD/YYYY hh:mm:ss tt')+ (330/24/60), 'MM/DD/YYYY hh:mm:ss tt').(this is working fine when i select any date from the filed shows me the right result regarding that date.)
Using same at Back end: date(date(date#(CREATEDDATETIME,'MM/DD/YYYY hh:mm:ss tt'), 'MM/DD/YYYY hh:mm:ss tt')+ (330/24/60), 'MM/DD/YYYY hh:mm:ss tt') as newdate
Best Regards
Ankit
Thank you for your responses people, Anyhow got the solution from one of my friend. And it works like this with my script .
-- Timestamp(CREATEDDATETIME+Interval('5:30','mm:ss')) as NewDate
I have checked data in my app by using this code.
May be like this ?
Sample:
LOAD
date(date(date#(Date,'MM/DD/YYYY hh:mm:ss tt'), 'MM/DD/YYYY hh:mm:ss tt')+ (330/24/60), 'MM/DD/YYYY hh:mm:ss tt') as New
INLINE [
Date
3/31/2010 9:09:24 AM
];
I hope this may help
Output i m getting in the front end is :
03/31/2010 2:39:24 pm
Is this correct ?
-Nagarjun
Can you share some sample file, to figure out the issue.
Its working in my script, check the attachment.
Hi Ankit
Please use this, it might help
Timestamp(CREATEDDATETIME+Interval('5:30','mm:ss')) as NewDate
this function is working with the inline table or sample table if i create any , but not with my field . sharing the screenshots of Scripting and front end results.
Yes and i am using the same script, as told before but not working on backend , however works find with text object
Thank you for your responses people, Anyhow got the solution from one of my friend. And it works like this with my script .
-- Timestamp(CREATEDDATETIME+Interval('5:30','mm:ss')) as NewDate