Reason: Please use code tags. Join Date: Mar With some assumptions, Try this, We have to do error handling in below code Code :. Last edited by pamu; at AM.. Join Date: Sep Hi In gnu sed and date: Code :. Akshay Hegde. Join Date: Nov One more might be bad approach calling date inside awk and even lengthy Code :. Join Date: Jul Not sure where to take the time from, so - Code :. Join Date: Oct Yes no need to use date to reformat this one it's just a simple string manipulation, this is simplar to RudiCs: Code :.
Change date format in a file. We often need to change the date format while checking. Here are some ways which you can use to change the date format in Oracle database. We can change the parameter in the session and choose whatever format we want for the Oracle date. Here is the sql which can be used to do in the session. Either the target field for the date should be defined as string to load the desired format or it should be defined at db level to accept the date format we pass.
If the target is a flat file, we can change the date format as 'dd-mon-yy' for which no conversions needed. Error: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled.
Please turn JavaScript back on and reload this page. Please enter a title. You cannot post a blank message. Surya Mandal Surya Mandal 1 1 gold badge 4 4 silver badges 17 17 bronze badges. Look at the argument you're passing to SimpleDateFormat. That doesn't match the format of the string you're parsing.
As for your format version - you need to parse the original string into a Date first, then format it. Basically, you need two SimpleDateFormat objects, one with the input format and one with the output format. Parse using format dd-MMM-yyyy. And read this carefully, esp. Add a comment. Active Oldest Votes. Improve this answer.
0コメント