Error: ORA-01847: day of month must be between 1 and last day of month
Hi,
I am getting this ORA-01847: day of month must be between 1 and last day of month type of error but I have checked my data all are correct.
I am inserting the data in the merge query. It is giving the above error.
but when i insert the data like that
insert into dt(start_date) select TO_DATE (tariff_start_date, 'DD/MM/RRRR') from ext_zpp0a871;
It does not give any error.
Please find the below code
DECLARE
l_sv_error_msg VARCHAR2 (1000);
BEGIN
FOR i IN (SELECT condition_type, sales_org, division_channel, division,
price_list, ean_upc, amount, unit_of_measure1,
tariff_start_date, tariff_end_date
FROM ext_zpp0a871--This is external table
WHERE condition_type = 'ZPP0' AND ROWNUM < 200)
LOOP
BEGIN
MERGE INTO sap_tariff st
USING (SELECT i.price_list pl, i.ean_upc upc,
TO_DATE (i.tariff_start_date, 'DD/MM/RRRR') tsd,
TO_DATE (i.tariff_end_date, 'DD/MM/RRRR') ted
FROM DUAL) du
ON (st.prod_ean_cuni = du.upc
AND st.pricelist = du.pl
AND st.tariff_start_date = du.tsd
AND st.tariff_end_date = du.ted)
WHEN MATCHED THEN
UPDATE
SET st.condition_type = i.condition_type,
st.sales_org = i.sales_org,
st.division_channel = i.division_channel,
st.division = i.division,
st.amount =
TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
st.uom = i.unit_of_measure1
WHEN NOT MATCHED THEN
INSERT (condition_type, sales_org, division_channel, division,
pricelist, prod_ean_cuni, amount, uom,
tariff_start_date, tariff_end_date)
VALUES (i.condition_type, i.sales_org, i.division_channel,
i.division, i.price_list, i.ean_upc,
TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
i.unit_of_measure1,
TO_DATE (i.tariff_start_date, 'DD/MM/RRRR'),
TO_DATE (i.tariff_end_date, 'DD/MM/RRRR'));
/*INSERT INTO sap_tariff
(condition_type, sales_org, division_channel,
division, pricelist, prod_ean_cuni,
amount,
uom,
tariff_start_date,
tariff_end_date
VALUES (i.condition_type, i.sales_org, i.division_channel,
i.division, i.price_list, i.ean_upc,
TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
i.unit_of_measure1,
TO_DATE (i.tariff_start_date, 'DD/MM/RRRR'),
TO_DATE (i.tariff_end_date, 'DD/MM/RRRR')
EXCEPTION
WHEN DUP_VAL_ON_INDEX
THEN
UPDATE sap_tariff
SET condition_type = i.condition_type,
sales_org = i.sales_org,
division_channel = i.division_channel,
division = i.division,
amount =
TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
uom = i.unit_of_measure1;
WHEN OTHERS
THEN
l_sv_error_msg := SQLERRM (SQLCODE);
INSERT INTO sap_tariff_log
(date_of_load, condition_type, sales_org,
division_channel, division, price_list,
prod_ean_cuni, amount, uom,
tariff_start_date, tariff_end_date,
rejection_reason
VALUES (SYSDATE, i.condition_type, i.sales_org,
i.division_channel, i.division, i.price_list,
i.ean_upc, i.amount, i.unit_of_measure1,
i.tariff_start_date, i.tariff_end_date,
l_sv_error_msg
END;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
l_sv_error_msg := SQLERRM (SQLCODE);
neo_pro_log ('Others Error', l_sv_error_msg);
END;
user13400510 wrote:
but when i insert the data like that
insert into dt(start_date) select TO_DATE (tariff_start_date, 'DD/MM/RRRR') from ext_zpp0a871;
It does not give any error.Maybe the error is on tariff_end_date instead of tariff_start_date ?
What are the datatypes of tariff_start_date and tariff_end_date ? If they are already dates, and you to_date them (and depending on what your nls_date_xxxxx params are) you can have such errors :SQL> sho parameter nls_date_format
NAME_COL_PLUS_SHOW_PARAM TYPE VALUE_COL_PLUS_SHOW_PARAM
nls_date_format string DD/MM/YYYY
SQL> select to_date(sysdate,'Day dd Mon RRRR') from dual;
select to_date(sysdate,'Day dd Mon RRRR') from dual
ERROR at line 1:
ORA-01846: not a valid day of the week
SQL> select to_date(sysdate,'hh24:mi:ss dd/mm/rrrr') from dual;
select to_date(sysdate,'hh24:mi:ss dd/mm/rrrr') from dual
ERROR at line 1:
ORA-01850: hour must be between 0 and 23
Similar Messages
-
How to find first and last day of last month?.
Hello,
I am using Crystal Report XI.
Reports will be generated on first of every month for
previous month. I want to find start and end date of previous month
dynamic.
For august, Start date is July 1st and End date July 31st.
For September, start date is Aug 1st and Aug 31st.
How can i get first of previous month as start date and last
day of the previous month as end date?.
Same kind of thing I want to do for future report ..find next
month start date and end date.
ThanksAdomacro,
you could do a function, like this
<cffunction name="getReportdates" returntype="struct"
hint="Given an arbitrary month and year, the function returns a
structure containing the first and last day of the previous
month">
<!--- Take current month and current year as the default
--->
<cfargument name="mnth" type="string" required="No"
default="#monthAsString(month(now()))#">
<cfargument name="yr" type="numeric" required="No"
default="#year(now())#">
<cfset firstDayOfGivenMonth = parseDateTime("1 " &
arguments.mnth & " #arguments.yr#")>
<cfset lastDayOfPreviousMonth =
dateAdd("d",-1,firstDayOfGivenMonth)>
<cfset numberOfDaysOfPreviousMonth =
daysInMonth(lastDayOfPreviousMonth)>
<cfset firstDayOfPreviousMonth =
dateAdd("d",-#numberOfDaysOfPreviousMonth#,firstDayOfGivenMonth)>
<cfset reportDates = structNew()>
<cfset reportDates.firstDayOfPreviousMonth =
firstDayOfPreviousMonth>
<cfset reportDates.lastDayOfPreviousMonth =
lastDayOfPreviousMonth>
<cfreturn reportDates>
</cffunction>
<!--- Example usage --->
<p>
Given month: <strong>March
2004</strong><br>
begin date:
<cfoutput>#dateFormat(getReportdates('March',2004).firstDayOfPreviousMonth,"d
mmm yyyy")#</cfoutput><br>
end date:
<cfoutput>#dateFormat(getReportdates('March',2004).lastDayOfPreviousMonth,"d
mmm yyyy")#</cfoutput><br>
</p>
<p>
Given month: <strong>August
2007</strong><br>
begin date:
<cfoutput>#dateFormat(getReportdates('August',2007).firstDayOfPreviousMonth,"d
mmm yyyy")#</cfoutput><br>
end date:
<cfoutput>#dateFormat(getReportdates('August',2007).lastDayOfPreviousMonth,"d
mmm yyyy")#</cfoutput><br>
</p> -
How to find first and last day of previous month?.
Based on current month, I want to find start and end day of
previous month.
For example,
For august, Start date is July 1st and End date July 31st.
How can i get first of previous month as start date and last
day of the previous month as end date?.
Same way,
i want to find start date of current month and end date of
next month.
Example:
For august,
i want to get start date, august 1st and end date : september
30.
How can i do this from current date or now().
I am looking for best and easy way to find start and end
dates..
Thanks<cfset today = now()>
<cfset firstOfThisMonth = createDate(year(today),
month(today), 1)>
<cfset lastOfNextMonth = dateAdd("d", -1, dateAdd("m", 2,
firstOfThisMonth))>
<cfoutput>
today = #today#<br>
firstOfThisMonth = #firstOfThisMonth#<br>
lastOfNextMonth = #lastOfNextMonth#<br>
</cfoutput>
Edit - To find the start and end day of previous month, get
the first of THIS month. Use Subtract 1 month ("m") to get the
start date. Subtract 1 day ("d") to get the end date. -
ORA-01847: day of month must be between 1 and last day of month error
Hi All
When i run the following code i'm getting the error:ORA-01847: day of month must be between 1 and last day of month error
SELECT t2.owner_cat,
t1.owner_id,
stock_id,
Sum(received_amount) received_amount,
Sum(curr_amount) curr_amount,
Sum(used_amount) used_amount,
To_char(Add_months(date_work,6),'YYYY') date_work
FROM (SELECT owner_id_to owner_id,
stock_id_to stock_id,
Sum(full_amount) received_amount,
0 curr_amount,
0 used_amount,
To_char(0) date_work
FROM dw_wms_mat_transfer
WHERE master_code_id IN ('8664','8665')
GROUP BY owner_id_to,
stock_id_to
UNION ALL
SELECT owner_id,
stock_id,
0 received_amount,
Sum(curr_amount) curr_amount,
0 used_amount,
To_char(0) date_work
FROM dw_wms_mat_inv
WHERE master_code_id IN ('8664','8665')
GROUP BY owner_id,
stock_id
UNION ALL
SELECT t2.owner_id,
t1.stock_id,
0 received_amt,
0 curr_amt,
Sum(amount) used_amt,
To_char(Add_months(date_work,6),'YYYY') date_work
FROM dw_wms_wo_mat_dc t1,
(SELECT owner_id,
stock_id
FROM dw_wms_mat_inv
WHERE master_code_id IN ('8664','8665')
GROUP BY owner_id,
stock_id) t2
WHERE t1.stock_id = t2.stock_id
GROUP BY t2.owner_id,
t1.stock_id,
To_char(Add_months(date_work,6),'YYYY')) t1,
dw_wms_setup_owner t2
WHERE t1.owner_id = t2.owner_id
GROUP BY t2.owner_cat,
t1.owner_id,
stock_id,
To_char(Add_months(date_work,6),'YYYY')
But when i just run the inner query:
(SELECT owner_id_to owner_id,
stock_id_to stock_id,
Sum(full_amount) received_amount,
0 curr_amount,
0 used_amount,
To_char(0) date_work
FROM dw_wms_mat_transfer
WHERE master_code_id IN ('8664','8665')
GROUP BY owner_id_to,
stock_id_to
UNION ALL
SELECT owner_id,
stock_id,
0 received_amount,
Sum(curr_amount) curr_amount,
0 used_amount,
To_char(0) date_work
FROM dw_wms_mat_inv
WHERE master_code_id IN ('8664','8665')
GROUP BY owner_id,
stock_id
UNION ALL
SELECT t2.owner_id,
t1.stock_id,
0 received_amt,
0 curr_amt,
Sum(amount) used_amt,
To_char(Add_months(date_work,6),'YYYY') date_work
FROM dw_wms_wo_mat_dc t1,
(SELECT owner_id,
stock_id
FROM dw_wms_mat_inv
WHERE master_code_id IN ('8664','8665')
GROUP BY owner_id,
stock_id) t2
WHERE t1.stock_id = t2.stock_id
GROUP BY t2.owner_id,
t1.stock_id,
To_char(Add_months(date_work,6),'YYYY'))
I'm not getting that error, any help please?Hi,
Like Anuraq already explained, you need to keep in mind that when you apply a to_char, you've turned your DATE datatype into a STRING and by doing that you've lost the ability to use the add_months function again in your outer query.
Using a simplified example, extracted from your example:
MHO%xe> select to_char(add_months(date_work, 6), 'yyyy') date_work
2 from ( select to_char(0) date_work
3 from dual
4 union all
5 select to_char(0) date_work
6 from dual
7 union all
8 select to_char(add_months(sysdate, 6), 'yyyy') date_work
9 from dual
10 );
select to_char(add_months(date_work, 6), 'yyyy') date_work
FOUT in regel 1:
.ORA-01847: day of month must be between 1 and last day of monthHowever, you should either do something like:
MHO%xe> select nvl(to_char(add_months(date_work, 12), 'yyyy'), '0') date_work
2 from ( select to_date(null) date_work
3 from dual
4 union all
5 select to_date(null) date_work
6 from dual
7 union all
8 select sysdate date_work
9 from dual
10 );
DATE
0
0
2010or (less clear, more confusing):
MHO%xe> select nvl(to_char(add_months(date_work, 6), 'yyyy'), '0') date_work
2 from ( select to_date(null) date_work
3 from dual
4 union all
5 select to_date(null) date_work
6 from dual
7 union all
8 select add_months(sysdate, 6) date_work
9 from dual
10 );
DATE
0
0
2010It's not clear to me why you're using add_months twice (inner + outer query) in your original example.
As you can see you can get the same results using it only once in your outer query. -
Ora-01847 error (day of month must be between 1 and last day of month)
Hi
Executng the below query, I am getting error ora-01847
INSERT INTO SVC_ORDER
(DUE_DATE)
SELECT to_date(lpad(decode(O.SVC_ORD_DT_REQ,999999,null,O.SVC_ORD_DT_REQ),6,'0'),'rrmmdd') AS DUE_DT
FROM M04_NT_UV_ORD_ADMIN OThe query is from the thread I linked above
WITH m04_nt_uv_ord_admin AS (
SELECT '999999' svc_ord_dt_req FROM dual UNION ALL
SELECT '120215' svc_ord_dt_req FROM dual UNION ALL
SELECT '1231' svc_ord_dt_req FROM dual UNION ALL
SELECT '1232' svc_ord_dt_req FROM dual UNION ALL
SELECT '514208' svc_ord_dt_req FROM dual UNION ALL
SELECT '120314' svc_ord_dt_req FROM dual UNION ALL
SELECT '121312' svc_ord_dt_req FROM dual UNION ALL
SELECT '0' svc_ord_dt_req FROM dual
SELECT CASE WHEN
CASE WHEN TO_NUMBER(SUBSTR(LPAD(o.svc_ord_dt_req,6,'0'),3,2))
NOT BETWEEN 1 AND 12
THEN
'error'
WHEN TO_NUMBER(SUBSTR(LPAD(o.svc_ord_dt_req,6,'0'),5,2))
NOT BETWEEN 1
AND TO_NUMBER(
TO_CHAR(
LAST_DAY(
TO_DATE(
SUBSTR(LPAD(o.svc_ord_dt_req,6,'0'),1,4)
,'rrmm')
,'dd'))
THEN
'error'
END IS NOT NULL
THEN
NULL
ELSE
TO_DATE(LPAD(o.svc_ord_dt_req,6,'0'),'rrmmdd')
END check_date
,o.svc_ord_dt_req
FROM m04_nt_uv_ord_admin o
WHERE o.svc_ord_dt_req != 999999;
CHECK_DATE SVC_ORD_DT_REQ
15.02.2012 120215
31.12.2000 1231
1232
514208
14.03.2012 120314
121312
0 Regards
Marcus -
Day must be between 1 and last day of month
Hi
I have a master detail form for overtime entries.
Master Block contain emp_no,name,month etc.
Detail block contain a date field ,,from time, to time etc
when i enter the date in detail block it defaults the month from Server date and i am getting the error "Day must be between 1 and last day of ...."
The form is going to reside on server so i cant go for changing system date for that.
THe work around i am trying is i have created a dummy item in detail block for Date(dd) entry and populating my original date field on the basis of it.
so that i can get rid of last day validation of month.The datatype of dummy item is char
my code is
c_day varchar(2);
c_month varchar(2);
c_year varchar(4);
d_date varchar(8);
begin
c_day := :DETAIL.dummy;
c_month := to_char(:MASTER.month, 'mm');
c_year := to_char(:master.month, 'yyyy');
d_date := c_day||c_month||c_year;
:DETAIL.ot_date := to_date(d_date,'ddmmyyyy');
end;
I am using post change trigger on my dummy item but i am getting ORA-01840 for that.I have tried several ways but it is giving different type of date errors for that.
Any help is highly appreciatedDear try this
SELECT RUN_NUM, CV AS MONTH_DATE
FROM
SELECT ROWNUM AS RUN_NUM,TO_DATE('01-' || 'SEP' || '-' || 2007 ,'DD/MM/YYYY')+ (ROWNUM-1) CV
FROM
(SELECT 1 FROM DUAL GROUP BY CUBE (1,1,1,1,1)) A
WHERE TO_CHAR(CV,'MON-YYYY') = 'SEP-2007' -
Get first and last day given month name with combobox
hi guys ;
I loaded to month name in combobox and I want to get first and last day by the name of month from selected Combobox
So if I select to february than results get 01.02.2015 and 28.02.2015
if select March than 01.03.2015 and 31.03.2015
Thanks .Thank you for useful post , How to change Culturinfo as a Turkish Month name ?
your's code is work if I use English month name But it was get error when use the turkish month name
If you are running your application on a Turkish Windows you could use the System.Globalization.CultureInfo.CurrentCulture:
int month = DateTime.ParseExact(monthName, "MMMM", System.Globalization.CultureInfo.CurrentCulture).Month;
Or you could use create an explicit culture object like this:
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("tr-TR");
int month = DateTime.ParseExact(monthName, "MMMM", ci).Month;
Please remember to mark all helpful posts as answer to close your threads. -
Get First and last day of Month..
Hi Friends,
I am trying to fetch First and Last day of a month and would like to implement that in the following code:
SELECT COALESCE(Date_A, Date_B, Date_C)
FROM dual
Here Date A and B are in Format of MM DD YYYY (March 14, 2008)
and Date C is like MM YYYY (March 2008)
How can I get the Date_C as March 1, 2008 OR March 31, 2008 format if Date A and B are NULL ?
Thanks!
Edited by: user11095386 on Apr 23, 2009 10:45 AMHi,
In my earlier message, I thought that you were starting with strings like '03 12 2009' and that you wanted to display them as 'March 12 2009'. If what you have is just the reverse, then just reverse the format strings in my first message. Add a comma, if you want one, in the appropriate format string.
I believe this is what you want:
COALESCE ( TO_CHAR ( TO_DATE ( Date_A, 'fmMonth DD YYYY'), 'MM DD YYYY')
, TO_CHAR ( TO_DATE ( Date_B, 'fmMonth DD YYYY'), 'MM DD YYYY')
, TO_CHAR ( TO_DATE ( Date_C, 'fmMonth YYYY'), 'MM DD YYYY')
)Notice how, on the 3rd line, TO_DATE is called without DD in the format string:
TO_DATE ( Date_C, 'fmMonth YYYY')When you do this, the day defaults to the 1st of the month, so this is all you have to do to convert the VARCHAR2 'March 2009' to the DATE 01-Mar-2009.
If you want the last day of the month, not the first, when Date_C is chosen, then use LAST_DAY:
COALESCE ( TO_CHAR ( TO_DATE ( Date_A, 'fmMonth DD YYYY'), 'MM DD YYYY')
, TO_CHAR ( TO_DATE ( Date_B, 'fmMonth DD YYYY'), 'MM DD YYYY')
, TO_CHAR ( LAST_DAY ( TO_DATE ( Date_C
, 'fmMonth YYYY'
, 'MM DD YYYY'
) -
SQL select Statement -first day and last day of the month - 1 year from now
Hi,
I need to write a SQL to get the dates in between first day and last day of the month one year from now.
SELECT last_day(add_months(sysdate,12)) as lastday from dual
What could be the Query to get the first day of the month one year from now..
ie ..Sysdate - 3-DEC-2009
Result - 1-DEC-2010
thank youHi,
You can use TRUNC with 2 arguments to get the first DATE in a month, year, quarter, week, hour, minute, ISO year, ...
SELECT TRUNC ( ADD_MONTHS ( SYSDATE
, 12
, 'MONTH'
) AS first_of_month
FROM dual
;The DATE returned will be in the same month, year, quearter, ... as the first argument.
\We convered the last day of the month in [your previous question|http://forums.oracle.com/forums/message.jspa?messageID=3942939#3942939].
At that time, I warded about using LAST_DAY as a cutoff point; TRUNC is a much better way.
For example, to find all appointment_dates in the current month next year:
SELECT *
FROM appointments
WHERE appointment_date >= TRUNC (ADD_MONTHS (SYSDATE, 12), 'MONTH')
AND appointment_date < TRUNC (ADD_MONTHS (SYSDATE, 13), 'MONTH')Note that
the first part of the WHERE clause calls for dates on or equal to the beginning of the 12th month in the future, but
the second part of the WHERE clause calls for dates before, not equal to , the beginning of the 13th month in the future. -
i have iphone 3gs and last days i made upgrade 5.01, but i dont know that this version is not avaliable in brasil yet. than my iphone 3gs 32 gb no more find the wide and it be seaching the sinal. what i need to do to back to before situation. thanks a lot
iOS 5.0.1 has been out for a couple months, if not longer.
There was no delay in releasing it in any country.
So what is your issue? -
Query for back 2nd motnh first day and last day
Any body please provide me the query for back 2nd month first day to back 2nd month last day?
last month first day
TIMESTAMPADD(SQL_TSI_MONTH,-1, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE))
last month last day
TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)), CURRENT_DATE)
anyone please provide me the queries for previous months like above queries?
2nd back month first day --?
2nd back month last day--?
3rd back month first day --?
3rd back month last day --?Hi,
Check with this...
Previous month last day -
TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)
Last day of 2nd month -
TIMESTAMPADD(SQL_TSI_MONTH,-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))
Last day of 3rd month -
TIMESTAMPADD(SQL_TSI_MONTH,-2,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))
(OR)
Previous month last day -
TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)
Last day of 2nd month -
TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))
Last day of 3rd month -
TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)))*-1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1, CURRENT_DATE)))
Regards,
Srikanth -
Getting first and last day of week
Dear all .
Is there any funcion module which gives first and last day of the current week .
Eg . todays day is 15.11.2006
start date of week : 13.11.2006
end date of week : 19.11.2006
in the same way I want how many days are there in month .
Eg : for Nov month :
30 days .
for dec month 31 days .
Thank you in advanceUse FM GET_WEEK_INFO_BASED_ON_DATE
Import parameters Value
DATE 15.11.2006
Export parameters Value
WEEK 200646
MONDAY 13.11.2006
SUNDAY 19.11.2006
Use FM HR_E_NUM_OF_DAYS_OF_MONTH
Import parameters Value
P_FECHA 15.11.2006
Export parameters Value
NUMBER_OF_DAYS 30
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers -
Get first and last date of month
Hi,
Is there any function module to get first and last date of month for a entered date.
Please let me know.
Regards,
SPHi,
Use the below FM to find the Last day of month and them u can easily calculate the first day.
DATA : v_startdate TYPE sy-datum.
DATA : v_enddate TYPE sy-datum.
DATA : v_temp TYPE dats.
v_temp = sy-datum.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = v_temp
IMPORTING
last_day_of_month = v_enddate
CONCATENATE v_enddate+0(6) '01' INTO v_startdate.
Hope it helps.
Regards,
Arnab. -
Need the first day of the year and last day of the year.
hi all,
i need a function module which can get me the first day of current year and last day of the current year??
please help.Similar date questions are being asked ALL THE TIME. Please search.
-
Find the first and last day of week giving a certain date
Hi,
i have an application in wich the user puts a date, say today 2010-08-10 and i have to calculate first and last day of that week, in this case 2010-08-09 and 2010-08-15. How can i do this?
Many thanks in advance,
Nuno Almeidanfalmeida wrote:
i have an application in wich the user puts a date, say today 2010-08-10 and i have to calculate first and last day of that week, in this case 2010-08-09 and 2010-08-15. How can i do this?First step is being sure that you know what a 'week' is.
For example does it really start on monday? And will it always start on monday?
And what day does the 'week' end on for 2010-12-29? In some businesses it will end on 2010-12-31 (friday)
Maybe you are looking for
-
Calling 10g Report from 6i Form
A 6i client-server form has a call to a 10g report in the form of a URL. The HOST command calls Internet Explorer and with the URL appended. This, however, keeps the form locked until IE is closed. Is there a way around this or a better way to call a
-
Standard/Advanced print dialogue for PDFs?
When you print an image such as a jpeg in Mac OS X 10.4 you get the option of standard or advanced print dialogues. One feature of the Apple's new standard option allows for rotating an image on the print area. This is great because it potentially al
-
How can I remap the number key '5' to become the letter 't'
On my macbook pro, I stupidly spilt tropical juice onto and my friend has given me his old mac keyboard (the full one including a numpad) however the the letter 't'button doesn't work, is there anyway i could remap the number '5' to become the letter
-
Hi Experts, I have a question if data in cube is not compressed and there is no data at all in E fact table can we do partitioning on the cube (3.x Version) Thanks in Advance, Nitya
-
[Solved] Default NIC Module?
I'm trying to troubleshoot an issue I'm having with Steam downloads, and I'm thinking it may be my NIC drivers. I have a Intel Gigabit CT, with the latest 3.1.0.2 drivers. I was wondering what drivers or modules Arch was using before I installed the