In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Date Conversions in InDatabase

AJ-CH
8 - Asteroid

Hello, 

I have to convert my DateofService (Datetime) to YYYY-MM, how I can do that in InDB. I know if it is in normal workflow it should be DateTimeFormat([dateofservice],"%Y-%m")
But, when using InDB, this formula isn't working.

Please help...

1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

You need to use a SQL formula. The exact syntax varies depending on server.

 

For example for SQL Server:

Convert(Char(7),"DateofService",120)

should do what you want

Labels
Top Solution Authors