Skip to content

DbFunctions Methods - Please include a FORMAT function for dates #2303

Closed
@KingsGithub

Description

@KingsGithub

The DbFunctions in EF is useful but unfortunately lacks one thing I see a lot of people need - a way to convert or format date/datetime fields to strings in a specific format - and have that used by the LINQ process in the query itself.
It would be great to be able to use something like dbfunctions.format(someDate[Time], someFormatString) where the formatString makes use of all those pre-defined format pictures, e.g. yyyyMM or yyyy.mm.dd or YYYY.MM.DD HH:MI:SS or whatever.
Right now it's just ridiculously hard - unless of course there's a straight-forward and simple way that I'm just not familiar with????
Please.

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