File tree 2 files changed +11
-1
lines changed
src/PhpSpreadsheet/Calculation/TextData
tests/data/Calculation/TextData
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ public static function TEXTFORMAT($value, $format)
129
129
$ format = Helpers::extractString ($ format );
130
130
131
131
if (!is_numeric ($ value ) && Date::isDateTimeFormatCode ($ format )) {
132
- $ value = DateTimeExcel \DateValue::fromString ($ value );
132
+ $ value = DateTimeExcel \DateValue::fromString ($ value ) + DateTimeExcel \TimeValue:: fromString ( $ value ) ;
133
133
}
134
134
135
135
return (string ) NumberFormat::toFormattedString ($ value , $ format );
Original file line number Diff line number Diff line change 61
61
'1-Jan-2012 ' ,
62
62
'yyyy-mm-dd ' ,
63
63
],
64
+ 'time (issue 3409) ' => [
65
+ '09:01:00 ' ,
66
+ '09:01 ' ,
67
+ 'HH:MM:SS ' ,
68
+ ],
69
+ 'datetime ' => [
70
+ '15-Feb-2014 04:17:00 PM ' ,
71
+ '2014-02-15 16:17 ' ,
72
+ 'dd-mmm-yyyy HH:MM:SS AM/PM ' ,
73
+ ],
64
74
[
65
75
'1 3/4 ' ,
66
76
1.75 ,
You can’t perform that action at this time.
0 commit comments