当前位置: 动力学知识库 > 问答 > 编程问答 >

How to add one day in date in datastage server

问题描述:

How to add one day in VDate column where column VDate value is not fixed.

Example:

input VDate = "2013-02-07"

output VDate = "2013-02-08"

Please suggest.

网友答案:

Convert the date into a date type, then you can add or subtract days.

IConv converts a string into a datastage internal date format. Then you can perform addition/subtraction on the date. Then use OConv to convert the variable back to string format.

If this is done in a transformer stage, you need to do this all in one statement:

OConv(Iconv(VDate ,"D/YMD[4,2,2]") + 1), "D/YMD[4,2,2]")

http://www.dsxchange.com/viewtopic.php?p=330354&sid=bf68da51aa1b8e81c41a68a9233b7634

分享给朋友:
您可能感兴趣的文章:
随机阅读: