Skip to content

[Nice to have] having transformers to get date information from Datetime #6232

Open
@LittleLittleCloud

Description

@LittleLittleCloud

ModelBuilder just add support for Datetime type, in order to make the most use of this type, it would be helpful if ML.Net has API to extract specific date information from datetime column

Describe the solution you'd like

class Input
{
    public Datetime date {get; set;]
}

var pipeline = mlContext.Transformer.GetYearOutOfDate("year", "date")
                            .Append(mlContext.Transformer.GetDayOutOfDate("day", "date")
                            .Append(mlContext.Transformer.GetWeekdayOutOfDate("weekday", "date")
                            .Append(mlContext.Transformer.GetMonthOutOfDate("month", "date");
class Output
{
    public Datetme date {get; set;}
    public int Year {get; set;}
    public int day {get; set;}
    public string Month {get; set;} // Feb, Jan... 
    public string Weekday {get; set;} // Mon, Tue,..
}

What's more

ignore this issue if ML.Net already support that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority of the issue for triage purpose: Needs to be fixed at some point.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions