Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I have two date columns with timestamp called closed date('DD-MM-YY hh:mm:ss tt') and deadline date('DD-MM-YY hh:mm:ss tt')
Now I have to create two flags
If ([closed date]<[deadline date],1,0) as flag1
If ([closed date]>[deadline date],1,0) as flag2
but not getting accurate results.
whats wrong with this.?
Pls help as so needful.
Hi Antony,
Try like this:
If (timestamp(timestamp#([created date],'DD-MM-YY hh:mm:ss tt'))<timestamp(timestamp#([deadline date],'DD-MM-YY hh:mm:ss tt')),1,0) as flag1
If (timestamp(timestamp#([created date],'DD-MM-YY hh:mm:ss tt'))>timestamp(timestamp#([deadline date],'DD-MM-YY hh:mm:ss tt')),1,0) as flag2
Br,
KC
can you please share your qvw file and data source file ?
Hi Antony,
Try like this:
If (timestamp(timestamp#([created date],'DD-MM-YY hh:mm:ss tt'))<timestamp(timestamp#([deadline date],'DD-MM-YY hh:mm:ss tt')),1,0) as flag1
If (timestamp(timestamp#([created date],'DD-MM-YY hh:mm:ss tt'))>timestamp(timestamp#([deadline date],'DD-MM-YY hh:mm:ss tt')),1,0) as flag2
Br,
KC
actually am working on real data.
I have to create two flags based on these conditions.
– if the ticket is closed (Closed Date) before the deadline date
– if the ticket is closed (Closed Date) after the deadline date
am not getting accurate results because of timestamp.
How to handle this??
Hi Jyothish,
I tried the same but still no luck.
CAn you share a sample format of the date fields you are loading ?
Also can you share your script ?
Br,
KC
Hi Jyothish,
I have removed timestamp# in your expression. Now it is working perfectly.
Thank u!
Cool