Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Bengaluru, IN

Welcome to the Bengaluru User Group

Click in the JOIN GROUP button in Home to follow our news and attend our events!

SOLVED

remove zeros (hh:mm:ss) after the date.

stj1120
8 - Asteroid

Capture.jpg

Hi all,

 

Please help me with the output for the two columns by removing the zeros after the date. Currently the data type is datetime. I want it to Date data type.

 

I tried Todate(TrimRight('APPT_END_DT', '0')) and Todate(TrimRight('APPT_START_DT', '0'))

 

But still giving me the same output. It is not removing the leading zero decimals after the date. 

 

Thanks in advance.

 

Best Regards,

Sreenivasa Teja.

2 REPLIES 2
Manjunath
8 - Asteroid

Hi Sreenivas,

 

Could you try adding a select tool after the data and changing the data type to "Date" instead of "DateTime" ? That should do the trick

rag-ryx
9 - Comet

@stj1120 

 

Some of the Alteryx inbuilt functions are really powerful, like the DateTimeParse function, especially if your date are coming in forms of complex strings.

In your case you can use a formula tool with the below expression - 

DateTimeParse([APPT_END_DT],"%y-%m-%d")

 

Hopefully, this resolves your issue. Let me know if this isn't what you were looking for.


Sol.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

--

Best,

Raghav

"Keep Alter-ing Lives"