Hi @Maneesha John ,
Welcome to Microsoft Q&A platform and thanks for using Azure Services.
As I understand your question, you want to extract Date from Datetime(Timestamp) column using Data Flow.
Let us say we have Input Dataset with Datetime column, we can make sure the Type in Projection tab of the Source is string
:
Source Dataset looks like:
Next, we will use Derived Column transformation and in the expression builder we will write the expressions as:
1). If we want output column to be of Date Type, then toDate(LoginTime, 'dd/mm/yyyy')
:
2). If we want output column to be of String Type, then use toString(toDate(LoginTime, 'dd/mm/yyyy'),'yyyy-MM-dd')
:
If needed to convert to Date type, use toDate(toString(toDate(LoginTime, 'dd/mm/yyyy'),'yyyy-MM-dd'),'yyyy-MM-dd')
3). If need is to extract Date in some particular format, for example as dd-MM-yyyy, the use toString(toDate(LoginTime, 'dd/mm/yyyy'),'dd-MM-yyyy')
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification