我有一个“电话付款”表格,有四(4)栏。
我想要完成的是将invoice_date设置为每个用户输入新记录的新月份的第24天。
所以,例如-
January records should show
Phone_number User_name invoice_date invoice_amount
123456 test 24/1/2021 100
678901 testing 24/1/2012 200和
February records should show
Phone_number User_name invoice_date invoice_amount
123456 test 24/2/2021 200
678901 testing 24/2/2012 300等等在剩下的几个月里
发布于 2021-03-29 15:04:54
您问题中的“现在”是甲骨文中的sysdate。
要获得本月的第24天,您可以这样做:
trunc(sysdate, 'month') + 23(注:+ 23,因为截断的日期已经是一个月的第一天)。
您将如何使用这取决于总体情况(您对此做了什么),这是您没有包括在您的问题。
https://stackoverflow.com/questions/66856546
复制相似问题