Skip to content

Formatting with \ #6

@angex

Description

@angex

I am having issue with VBA.Format$ - this could be related to my regional settings (finnish)

For some reason function ConvertToIso(utc_LocalDate As Date) As String with parameter "27.4.2020 17.00.00":
VBA.Format$(ConvertToUtc(utc_LocalDate), "yyyy-mm-ddTHH:mm:ss.000Z")
->converts to "2020-04-27T14.00.00.000Z" (not correct)
If I modify it to
VBA.Format$(ConvertToUtc(utc_LocalDate), "yyyy-mm-ddTHH:mm:ss.000Z")
->converts to "2020-04-27T14:00.00.000Z" (not correct but one . is : as it shuold be)
So correct one would be:
VBA.Format$(ConvertToUtc(utc_LocalDate), "yyyy-mm-ddTHH:mm:ss.000Z")

See at bottom for ():
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/format-function-visual-basic-for-applications

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions