Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have system generated file that I work with regularly that provides date
and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=date(left(a1,4),mid(a1,5,2),mid(a1,7,2))+time(mid (a1,9,2),mid(a1,11,2),mid(a1,13,2)) Regards, Fred. "PowerUserInTraining" wrote in message ... I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How about this long winded solution
=TEXT(DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2)),"mm/dd/yy")&" "&TEXT(TIME(MID(A1,9,2),MID(A1,11,2),MID(A1,13,2)) ,"hh:mm:ss AM/PM") Mike "PowerUserInTraining" wrote: I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I could use a helper cell with a formula like:
=--TEXT(LEFT(A1,14),"0000\/00\/00 00\:00\:00") And give it a number format of: mm/dd/yyyy h:mm:ss AM/PM PowerUserInTraining wrote: I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm not sure if using slashes will allow for varying regional
interpretations of month/day ordering in that format; but, given the international date ordering inside the original text, using dashes can never be misinterpreted (plus it saves two characters)... =--TEXT(LEFT(A1,14),"0000-00-00 00\:00\:00") -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... I could use a helper cell with a formula like: =--TEXT(LEFT(A1,14),"0000\/00\/00 00\:00\:00") And give it a number format of: mm/dd/yyyy h:mm:ss AM/PM PowerUserInTraining wrote: I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Just curious...
Is the dash format ISO compliant while the slash format is not? Rick Rothstein wrote: I'm not sure if using slashes will allow for varying regional interpretations of month/day ordering in that format; but, given the international date ordering inside the original text, using dashes can never be misinterpreted (plus it saves two characters)... =--TEXT(LEFT(A1,14),"0000-00-00 00\:00\:00") -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... I could use a helper cell with a formula like: =--TEXT(LEFT(A1,14),"0000\/00\/00 00\:00\:00") And give it a number format of: mm/dd/yyyy h:mm:ss AM/PM PowerUserInTraining wrote: I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? -- Dave Peterson -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That is my understanding. See the General Principles section of this link...
http://en.wikipedia.org/wiki/ISO_8601 I know Excel will unambiguously evaluate dates using the YYYY-MM-DD format correctly; what I am not sure of is how it interprets the YYYY/MM/DD format; that is, I'm not sure if Excel will always unambiguously interpret the middle section as month and right section as days when that format is used with a 4-digit year. It may, in fact, do that, but I don't have the international experience to be sure it will do that under all possible regional settings. -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... Just curious... Is the dash format ISO compliant while the slash format is not? Rick Rothstein wrote: I'm not sure if using slashes will allow for varying regional interpretations of month/day ordering in that format; but, given the international date ordering inside the original text, using dashes can never be misinterpreted (plus it saves two characters)... =--TEXT(LEFT(A1,14),"0000-00-00 00\:00\:00") -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... I could use a helper cell with a formula like: =--TEXT(LEFT(A1,14),"0000\/00\/00 00\:00\:00") And give it a number format of: mm/dd/yyyy h:mm:ss AM/PM PowerUserInTraining wrote: I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? -- Dave Peterson -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have the same lack of experience with international issues. I'll try to
remember to use the dash (but keep an eye out <vbg.) Rick Rothstein wrote: That is my understanding. See the General Principles section of this link... http://en.wikipedia.org/wiki/ISO_8601 I know Excel will unambiguously evaluate dates using the YYYY-MM-DD format correctly; what I am not sure of is how it interprets the YYYY/MM/DD format; that is, I'm not sure if Excel will always unambiguously interpret the middle section as month and right section as days when that format is used with a 4-digit year. It may, in fact, do that, but I don't have the international experience to be sure it will do that under all possible regional settings. -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... Just curious... Is the dash format ISO compliant while the slash format is not? Rick Rothstein wrote: I'm not sure if using slashes will allow for varying regional interpretations of month/day ordering in that format; but, given the international date ordering inside the original text, using dashes can never be misinterpreted (plus it saves two characters)... =--TEXT(LEFT(A1,14),"0000-00-00 00\:00\:00") -- Rick (MVP - Excel) "Dave Peterson" wrote in message ... I could use a helper cell with a formula like: =--TEXT(LEFT(A1,14),"0000\/00\/00 00\:00\:00") And give it a number format of: mm/dd/yyyy h:mm:ss AM/PM PowerUserInTraining wrote: I have system generated file that I work with regularly that provides date and time information like this: 20080919021412.000000-240 I'm having difficulty converting that field to show the following date/time format: 9/19/08 2:14:12 AM Any suggestions? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting Date Field | Excel Discussion (Misc queries) | |||
New date based on one date field minus minutes in another field | Excel Discussion (Misc queries) | |||
Summin Pivot Table data from a date selected in the Page field | Excel Discussion (Misc queries) | |||
Linked date field in worksheet defaults a blank field as 1/0/1900 | Excel Worksheet Functions | |||
pivot tables-data field formatting | Excel Discussion (Misc queries) |