Share via

format datetime string into date string

arkiboys 9,711 Reputation points
2024-03-14T17:23:05.7633333+00:00

Hi,

In dataflow of ADF, inside the derived column, how can I convert a datetime string into a date string?

for example:

2023-12-27 00:00:00.0000000

to

2023-12-27

and in-case there is no value then it does not fail during conversion.

thank you

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

Answer accepted by question author

Olaf Helper 47,616 Reputation points
2024-03-14T17:38:43.08+00:00

convert a datetime string into a date string?

The data types datetime is a datetime, date is a date and a string is a string; there is no mix between.

A datetime do have a millisecond portion, you have to convert it date or you have to limit the string output to 10 characters to truncate the time portion.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.