• Optimize str2date function


    The job can be any string date format convert to AX date format.

    so that, Do not need to specify string date format, such as 123,132,321

    static void FAN_DateTimeNET(Args _args)
    {
        name        name;
        transDate   dt;
    
    transdate getTransDate(name   _dateStr)
    {
        System.DateTime netDatetime;
        transdate       ret;
        utcdateTime     utcDate;
    ;
        new InteropPermission(InteropKind::ClrInterop).assert();
        utcDate     = System.DateTime::Parse(_dateStr);
        netDatetime = System.DateTime::Parse(_dateStr);
        
        ret         = datetimeUtil::date(utcDate);
        
        info(netDatetime.ToLongDateString());//2013/8月/6日
        CodeAccessPermission::revertAssert();
        return ret;
    }
        ;
        name = "6/Aug/2013";
        dt = getTransDate(name);
        info(strfmt("%1", dt));//2013/8/6
        
        dt = str2date(name, 321);
        info(strfmt("%1", dt));//
    }

      

  • 相关阅读:
    Easy Code 自定义的模板
    LINUX批量修改文件名
    解决FTP登录太慢
    linux 命令
    Linux rename命令
    MySQL字段重复出现多少次
    kafka安装
    Redis 5.0简单安装
    Tomcat常用配置
    jenkins安装和简单配置
  • 原文地址:https://www.cnblogs.com/Fandyx/p/3198902.html
Copyright © 2020-2023  润新知