Forum Discussion

GKE2019's avatar
GKE2019
Brass Contributor
Feb 14, 2022

Date formating issues teams export to excel

Hello,

 

When I export my plan from Microsoft teams, the format of the date is still general.

Export from teams in excel

 

But when I run my the formatting of the date jumps on:

After I run the code I get this formatting.

 

 

This is a part of the code:

Range("F5:F100").NumberFormat = "dd-mm-jjjj"
Sheets("Tasks").UsedRange.Replace What:="\j\j\j\j", Replacement:="jjjj"

 

And that doesn't work, is there a way how I can fix this?

3 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    GKE2019 

    The way to fix is to convert texts which looks like dates into the dates (which are numbers in background) and after that apply desirable format to them. One of the eays

    - select column with such texts

    - Data -> Text to Columns

    - on the third step of the wizard select date and DMY

    • GKE2019's avatar
      GKE2019
      Brass Contributor
      Isn't there a way to do this with VBA?
      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        GKE2019 

        Perhaps, but that's not my territory.

        In general it could be easier to sync regional settings for your Microsoft Teams and desktop app; or adjust export script if you don't do that manually.

Resources