Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

DateTime conversion issue

preethisisaac
8 - Asteroid

Hi All,

I have a DateTime fields which is coming from DB in format "2020-12-20" (ie. "YYYY-MM-DD" ), which i wanted to reformat to "MM/DD/YYYY" and write to another  DateTime fields in SQL Database.

 

Please help.

 

Thanks,

Preethi

 

1 REPLY 1
echuong1
Alteryx Alumni (Retired)

What is the purpose of having your values in "MM/DD/YYYY" format? Is it just for presentation, or are you trying to filter/sort/calculate off of this field?

 

The correct format for a date in SQL is YYYY-MM-DD, which is why your data is coming into Alteryx in that format as well. Any other format (in Alteryx or SQL) would be considered a string, not a date. You can easily convert the format using the Datetime tool in Alteryx, but the result would be a string. If this is just for presentation purposes, that should work, and the output would need to go to a string field in the SQL database. 

 

echuong1_0-1612201314180.png

https://www.w3schools.com/sql/sql_dates.asp#:~:text=SQL%20Server%20comes%20with%20the,%2DDD%20HH%3AM... 

 

Labels