Sql developer importing excel date in 12 hour formay - excel

I'm trying to import date column using SQL developer but it's always changing to 12 hour format on import i.e if time is 18:00 it's importing as 6.
Could you please help with this ? I tried changing the nls in preferences and also tried changing system data format but it isn't working.

Sure, you want to be sure to make use of the Date Format entry on the wizard for the column you're reading from Excel during the Import wizard.
For your date, make sure you are using HH24 and not HH to represent the time.
A date in the Excel file:
Then as it's imported using a format date of 'MM/DD/RR HH24:MI'
18-06-1987 14:00:00

Related

Date formatting issues when opening CSV

I have a CSV report that contains a date/time field, but when I open it in Excel, it seems to try and auto format the date and time, but has some issues with certain dates.
If I open the CSV file in Notepad, all of the dates follow the same format, which is something like 2/1/17 12:00 AM (M/D/Y). However I get 2 different results, depending on the date. If the day is less than 12, it will display in yyyy-MM-dd (for example: 2002-01-17 12:00:00 AM), which is my system date format. If the day is > 12, it will display as 10/31/16 12:00 AM, which is exactly how it is formatted in the CSV source. So, in those cases it looks like it is being treated as text.
If I change my short date format to M/d/y, then everything works fine, however I believe we have standardized on yyyy-MM-dd, and this will need to be used by multiple people, so changing the date format for any users who need to use this spreadsheet isn't a great option.
Ideally, what I would like to do is prevent this from happening altogether, if possible by not having the dates be automatically formatted when the document is opened. Is that possible?

Sort Excel table based on date in text with time stamp and time zone

I have an excel sheet column with date time and time zone.(31-JAN-2017 23:45 EST).
I tried converting it to date and sort it in excel but is not working.
It is considering it as text and Feb is coming before Jan.
Any idea how to do it.
I have tried converting it to custom format with date and time and still it is not working.
Create a new column with :
=DATEVALUE(YourCell)
or
=DATEVALUE(LEFT(YourCell,11))
And this will be a date that should be able to sort properly on! ;)

How to have the same format for dates?

When I try to export in excel a list of incidents from HPSM I have an issue; the date has different formats: "dd/mm/yyyy hh:mm" or "mm/dd/yyyy hh:mm:ss". It is a problem because when the day and the month are both less the 12th then I don't know which is month or which is day.
Is it a possibility to have the same format or to create a program to do this?
I don't know HP Service Manager, but please consider exporting the data into two different files, one for each date setting, as CSV or Excel.
Then you can use tools like Power Query or the Text Import Wizard to open the files and set the origin date format of the column. Excel will then show that date column in your PC's regional settings format.

Excel - DateTime text to Column

I have multiple rows of datetime data.
For eg:
1/10/2014 10:10
2/3/2015 00:03
12/3/2015 12:03
4/3/2015 08:03
2/3/2015 14:03
6/3/2015 22:03
29/03/15 08:03:40
20/03/15 19:03:25
The first 6 rows seems to have been recognized as DateTime by Excel, whereas the 7th and 8th row seem to be in text format.
I'm not able to perform any datetime calculations on it.
I tried Text to Column, but that doesn't give me the option to keep the Date and Time together.
Please advise.
Use the Text to Columns tool and let the data be split into two columns. In step 3 define the date order as DMY (the order that the source data is in).
Then create a new column where you add the Date and time to get everything back into one column again. Copy, paste values, delete individual date and time columns.
If you cannot change the localization on your PC (or don't want to because it will mess up other things), you can always import this as text and then coerce the data into a date/time based on the known format. I don't know of any date parse function in Excel, so you may have to do it the brute force way:
=DATE(MID(A1,7,2)+2000,MID(A1,4,2),LEFT(A1,2))+TIMEVALUE(RIGHT(A1,8))
Because you have multiple formats on your input, you may actually be forced into this. If you want it to work universally on all dates, a UDF would probably be a good idea.
Excel parsed your date as:
mm/dd/yyyy hh:mm
as Excel Default. You can possibly overwrite that by trying what Teylyn have posted.
For example your 1st date: 1/10/2014 10:10 is interpreted as January 10, 2014 and not October 1, 2014.
What you need to do is identify and standardized your date format first.
Once you've done that, we can help you how to move forward in getting your dates correctly on the cells.

How to create and assign a Custom Format of date and time to an entire column in excel worksheet

I want a customized format(with milliseconds also) in such a way to handle for a date and time in Microsoft Excel.
Sample date and time:
08.25.2010 00:52:09.359
For understanding of above sample date time, it is 25th August 2010 12 hrs 52mins 9seconds 359 milliseconds(AM).
Please provide a custom Format to handle the above mentioned sample date and time and finally to apply for a column.
In Excel 2003 I use the following for time with fractions of second:
"hh:mm:ss,000"
(note: my decimal point is a "," - German)
so a time entered as 12:13:14,1516 will be displayed as 12:13:14,152
Hope this works for you
Edit 28-Nov-2012
I recently migrated to Excel 2010. Special format using up to 3 zero's after a comma for seconds as described above still works. More than 3 zero's however are not accepted.
I'm not certain what you mean by "not recognizing the dates" but the following custom format would give you the format you're looking for. You'll have to adjust the millisecond separator "." according to your localization, of course.
mm.dd.yyyy hh:mm:ss.000
Applying it to a column is as easy as right clicking the column header, selecting Format Cells, choosing Custom on the left and pasting that format string into the Type box.
If you're trying to enter dates in this format, I don't believe that Excel will support that. I don't know of any option to set the date separators to a "." for Excel. Even setting the date format to use dots under the Regional and Language Options doesn't make Excel recognize that.

Resources