Hello
We have a sheet that includes the date in custom date format (13/03/2018 8:15:00 AM)
We are using the below code to convert the date to different format and into text (Day of the week is hidden at this time)
<CODE>
Dim c As Range
For Each c In ws.UsedRange.Columns("C").Cells
' strDay = Format(c.Value, "dddd")
strDate = Format(c.Value, "YYYY/MM/DD")
'24 Hour time
strTime = Format(c.Value, "HH:mm")
c.NumberFormat = "@"
c.Value = strDate & Space(2) & "(yyyy/mm/dd)" & Space(35) & "at / Ã*" & Space(1) & strTime
Next c
<Code>
Now the issue
Based on the value in Column M (EN or FR) we want to change the strTime format
For FR we want the above strTime = Format(c.Value, "HH:mm")
for EN we want 'strTime = Format(c.Value, "HH:mm am/pm")
I assume we would need to update the format to one then loop thru all the populated cells in column M and then change the format but we have no idea where to even start.
We have a sheet that includes the date in custom date format (13/03/2018 8:15:00 AM)
We are using the below code to convert the date to different format and into text (Day of the week is hidden at this time)
<CODE>
Dim c As Range
For Each c In ws.UsedRange.Columns("C").Cells
' strDay = Format(c.Value, "dddd")
strDate = Format(c.Value, "YYYY/MM/DD")
'24 Hour time
strTime = Format(c.Value, "HH:mm")
c.NumberFormat = "@"
c.Value = strDate & Space(2) & "(yyyy/mm/dd)" & Space(35) & "at / Ã*" & Space(1) & strTime
Next c
<Code>
Now the issue
Based on the value in Column M (EN or FR) we want to change the strTime format
For FR we want the above strTime = Format(c.Value, "HH:mm")
for EN we want 'strTime = Format(c.Value, "HH:mm am/pm")
I assume we would need to update the format to one then loop thru all the populated cells in column M and then change the format but we have no idea where to even start.