IBM Cognos Report Studio - 如何从日期字段中删除时间

时间:2017-06-21 21:31:43

标签: report cognos

我在复杂的认知报告中有一个字段,用日期填充时间戳,但我没有看到在该字段的顶部放置任何格式。如何从日期中删除时间戳?

这就是我所看到的:

[Project Header].[Project Start Date]

1 个答案:

答案 0 :(得分:0)

将数据项([项目标题]。[项目开始日期])拖动到数据容器(列表,交叉表,图表,...)时,正在进行格式化。 单击容器内的数据项(确保单击实际数据项而不是标题)时,在属性窗口中查找数据格式:
enter image description here
然后从格式化组合框中选择日期:
enter image description here
附加选项将被投射到实际数据项目:

var timer = new Timer({
tick: 1,
ontick: function (s) {
    $('.timer').html(Math.round(s / 1000) - 1);
},
onstart: function () {
    $('.text-white').prop("disabled", true);
},
onstop: function () {
},
onpause: function () {
    console.log('timer set on pause')
},
onend: function () {
    $('.text-white').prop("disabled", false);
}
});

(function ($, timer) {

$('#sendCode').on("click", function () {

    var a = $.ajax({
        type: 'post',
        url: 'ajax-processor.php',
        data: {
            mobile: $('#agent_mobile').val(),
            actioncode: 23
        },
        dataType: "json",
        success: function (response) {

            switch (response.errorcode) {
                case 0://every things ok
                    timer.start(50);
                    $('.step1').hide();
                    $('.step2').show();
                    $('.verifySend').on('click', function () {
                        b = a.then(function (daat) {
                            return $.ajax({
                                type: 'post',
                                url: 'ajax-processor.php',
                                dataType: "json",
                                data: { mobile: daat.mobile , token: $('#verifycode-form-field').val() , actioncode: 24},
                                success: function (response2) {
                                    $('.msg').html(response2.strmsg).show();
                                    console.log(response2);
                                },
                                error: function (xhr, status, error) {
                                    console.log(status);
                                    console.log(error);    //verify.js:51
                                }
                            });
                        });
                    });
                    $('.changeNumber').on('click', function () {
                        $('.step1').show();
                        $('.msg').hide();
                        $('.step2').hide();
                    });
                    $('.text-white').on('click', function () {
                        timer.start(50);
                        $('.step1').show();
                        $('.msg').hide();
                        $('.step2').hide();
                    });
                    break;
                case 1://time less than 1min
                    $('.msg').html(response.strmsg).show();

                    break;
                case 2://mobile verify
                    $('.msg').html(response.strmsg).show();
                    break;
                case 3://wrong number
                    $('.msg').html(response.strmsg).show();
                    break;
                default:
                    console.log("contact us");
            }

        }
    });
});

})(jQuery, timer);