Hi I have a data set where I have diferent dates with different format which I want to change into dd-mm-yyyy
Input:
Date |
2022-01-02 |
2022-01-03 13:45:41 |
2022-01-05 |
2022-01-03 13:45:45 |
Below formate is dd-mm-yyyy
Output:
Date |
02-01-2022 |
03-01-2022 |
05-01-2022 |
03-01-2022 |
Hey @Sshasnk,
One way to approach this is just to use the date time tool and select the format you want to output to:
@Sshasnk ,
This is what appears to be your challenge: You have multiple date formats on input and you want to take those date values and change them into a string (non-ISO standard) format of MM/DD/YY.
The first part of the challenge is to normalize the dates (with and without time) by using a LEFT() function.
Left([Incoming Date],10)
Now all of your dates are in the format of YYYY-MM-DD
You now have a choice of how to solve this. One, you can cheat and use the date-time tool (please don't do that until you understand how to format dates). Two, you can use a string function to move the last 5 characters to the left and take the first 4 characters and paste them with a - before it.
Right(Left([Incoming Date],10),5) + "-" + Left([Incoming Date],4)
And the final choice might be to learn how to use date specifiers (help document) with:
DateTimeFormat(left([Incoming Date],10),"%m-%d-%Y")
Cheers,
Mark
User | Count |
---|---|
19 | |
15 | |
14 | |
9 | |
8 |