Function module to convert date and time
Hi ,
Requirment is i want to create a file in the application server.So the file name should be in the following format.
0XX-XXXX-YYYYMMDDHH.format.
in this HH-hours.I need to take current date and time.so is there any function module to convert into this format.If it is not there how to create file name in this format.
Thanks,
MR
REPORT ZTEST_CONV.
data: time_stamp TYPE timestampl.
GET TIME STAMP FIELD time_stamp.
You can try with GET TIME STAMP
But it will be in Different format.
Similar Messages
-
Function Module to get Date and Time out of Timestamp
Hi,
Source system timestamp field CREATED_TS of Type DEC-15
BW PSA data in format 20.140.707.105.948
In DSO, I have created two target InfoObjects; one for Date and one for Time.
In transformation from PSA to DSO, in field level routine, I want to split timestamp into Date and Time.
There is a function module CACS_TIMESTAMP_GET_DATE in source system but it is not available in BW. Another function module ADDR_CONVERT_TIMESTAMP_TO_DATE which is available in BW but returns only Date.
Does anyone know a function module in BW which takes Timestamp (PSA data in format 20.140.707.105.948) and returns Date and Time.
Much better would be a FM which take timestamp and also Timezone and returns Date and Time.
Thanks
AhmadTimestamp to date time conversion (with time zone) is built into ABAP. Why use a function module?
Read the ABAP help on CONVERT. -
Function module for comparing dates and times
Hi,
I have a date and time stamp in one filed for example as below:
20070125183045
(the first 8 are date in YYYYMMDD format, the next 6 is time in HHMMSS format). Now I want to compare this value to another such value in terms of date and time. First I want to compare dates and then times. Do you know any function module that can serve this purpose?
Thanks very much!You can compare these using the function module DURATION_DETERMINE. This fuction will give you the difference, and it can be in a view different units, such as the difference in days, months, etc.
Funciton module takes in Start date and time and end date and time.
Regards,
RIch HEilman -
FUNCTION MODULE TO CONVERT DATE / TIME INTO WORDS.
HI EXPERTS,
FUNCTION MODULE TO CONVERT DATE / TIME INTO WORDS.
PLS DO HELP.....Hiii gita
we have another FM SPELL_AMOUNT
regards
Jaipal -
Function module to convert date form yyyy/mm/dd to dd/mm/yyyy format
Can any one tell me Function module to convert date form yyyy/mm/dd to dd/mm/yyyy format?
have a look at the WIKI FAQs...they are very useful
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abapDevelopmentand+Programming&
For this it says:
<i>How to convert a date to internal or external format?
Use the functions modules CONVERT_DATE_TO_EXTERNAL or CONVERT_DATE_TO_INTERNAL
to convert the date. When converting to external format, the date format from the user's user profile will be used. When converting to internal format, the result will be in YYYYMMDD format.</i> -
Function module to convert date format from yyyymmdd to mmddyyyy format
function module to convert date format from yyyymmdd to mmddyyyy format
Hi Rajitha,
Do like this
Data: Var1 type sy-datum,
var2(8) type c.
var1 = sy-datum.
Concatanate var1+4(2) var1+6(2) var1+0(4) into var2.
write var2.
Reward Points if this helps,
Satish -
Is there any function module to convert date format?
Is there any function module to convert date format from mm/dd/yyyy to dd.mm.yyyy or sy-datum?
Hi,
wirte statement converts any date fomat in system date fromat
WRITE w_DateTO w_date_sys.
Regards,
Sriram -
Function Module to convert date to week from Sunday to Saturday
Hi,
In BW the convertion date to week always give week from Monday(1) to Sunday(7)
I'm looking for a function module to convert date to week from Sunday(1) to Saturday(7)
Thanks
SebastienHi,
I think this SAP standardized. Maybe you need to create custom FM.
You can copy SAP FM DATE_GET_WEEK. in the FORM FIRSTWEEK, I see below case,
CASE start_weekday.
WHEN if_calendar_definition=>c_monday.
start_weekday_number = 1.
WHEN if_calendar_definition=>c_tuesday.
start_weekday_number = 2.
WHEN if_calendar_definition=>c_wednesday.
start_weekday_number = 3.
WHEN if_calendar_definition=>c_thursday.
start_weekday_number = 4.
WHEN if_calendar_definition=>c_friday.
start_weekday_number = 5.
WHEN if_calendar_definition=>c_saturday.
start_weekday_number = 6.
WHEN if_calendar_definition=>c_sunday.
start_weekday_number = 7.
ENDCASE.
Maybe you can play something here. -
Function module to convert date format to yyyymmdd
Hi All,
Would like to seek for your advice. Is there any function module to convert the date format from mm/dd/yyyy to yyyy/mm/dd? Thanks in advance.
Regards,
Shawn
Moderator Message: Basic date question. Thread locked.
Edited by: Suhas Saha on Dec 30, 2011 12:44 PMHi,
Use the FM CONVERT_DATE_TO_EXTERNAL.
Edited by: emax nagu on Dec 30, 2011 7:53 AM -
Function module for convert date as sap internal format ?
Hi All,
Is there any standard function module to convert the date filed as SAP internal date?
My problem is while uploading data from excel sheet date filed can be any format
for exp: dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm or dd-mm-yyyy,mm-dd-yyyy
dd-mm-yyyy or dd.mm.yyyy or mm.dd.yyyy etc...
In our case there is no particular format in excel it can be differ for each user. I know we have few FM's in standard.
But those are not working for my req. pls help me if you have any idea.
Thanks in advance.
Regards,
Venkat Mote.Hi Venkatesh,
Can you please check with the following function module. For my case, it is working fine.
CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
EXPORTING
datum = p_gs_date
dtype = 'DATS'
IMPORTING
idate = p_gs_date
Hope it helps to you.
Regards
Rajkumar Narasimman -
Function that check if date and time between to dates and time
hi
is there any function that can check if date and time are between to dates and time ?
thanks
AmiYou can check using IF condition.
DATA : d1 TYPE datum, d2 TYPE datum, d3 TYPE datum.
IF d1 BETWEEN d2 AND d3.
d1 = d1 + 1.
ENDIF.
where d1, d2 and d3 are dates.
Similarly you can check for Time and Timestamp.
regards,
Jinson -
Function module to convert date form yyyy/mm/dd to mm/dd/yyyy format
can any one tell meFunction module to convert date form yyyy/mm/dd to mm/dd/yyyy format
hi
good
try this
report zrich_0001.
tables s002.
data ilikp type table of likp.
ranges: r_datum for sy-datum.
select-options: s_spbup for s002-spbup.
start-of-selection.
r_datum-sign = 'I'.
r_datum-option = 'BT'.
r_datum-low = s_spbup-low.
r_datum-low+6(2) = '01'.
if s_spbup-high is not initial.
r_datum-high = s_spbup-high.
r_datum-high+6(2) = '01'.
else.
r_datum-high = r_datum-low.
endif.
r_datum-high4(2) = r_datum-high4(2) + 1.
r_datum-high = r_datum-high - 1.
append r_datum.
select * into table ilikp from likp
where erdat in r_datum.
thanks
mrutyun^ -
Function Module to Convert date formate
Hi All,
I need to convert the date formate from ex :01-Jan-2009 into 01-01-2009.
Is there any Function Module for this?
Thanks
Partha.
Moderator message - Babu Kilari is correct - post locked
Edited by: Rob Burbank on Apr 27, 2009 9:36 AMHello Partha,
I wanted to ask you a question. Why did you not search SDN Forums before posting.
I think the time take for posting is higher than the time taken for searching.
Am I right??
Please let me know. I think the question you have posted is very basic
Thanks,
Babu Kilari -
Function module to convert date format
hi all,
i need a function module which will take the input as 09.02.2006(mmddyyy) and the out put should be sep-06. etc.
Thanks & Regards
sureshHi Suresh,
Use the function module 'MONTH_NAMES_GET' to get the month name and then use CONCATENATE to get SEP-06.
You can also check another post which is currently running 'Regarding Date Format'.
Thanks
Vinod -
Convert date and time in decimal characters
Hi,
I need to convert the date ad the time in decimal characters.
Any idea to do this ?
TNX in advance for your help
AlexAlex,
Please find the attached example. It displays the current time in time format, and it also has separate numeric indicators for hours, minutes, seconds.
If this is not what you were trying to do, please elaborate on your question.
The VI was created with LabVIEW 6.1
Zvezdana S.
National Instruments
Attachments:
Timer.vi 40 KB
Maybe you are looking for
-
Function module ISR_GET_DATA_FROM_XML throwing dump.
Hi All, Function module ISR_GET_DATA_FROM_XML throwing dump. The dump says, The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not caught in procedure "ISR_GET_DATA_FROM_XML" "(FUNCTION)", nor was it propagated by a RAISING clause
-
Could not resolve s:MobileApplication to a component implementation
Hi I have used the latest version of launchpad to generate a project which I then opened in Flash Builder 4. When I tried to compile this an error came up... Can anyone help? Bruce.
-
Hi Suppose i want 1:2 transformation. Both the destinations are of the same type. (say two database tables have to be updated int he receiver end, ) 1. I can create one business service with two receiver interfaces. And go for multimapping. or 2. I c
-
Can iSyncPluginMaker be downloaded as standalone version *without XCode*?
Hello! Is there any way to download *only* iSyncPluginMaker without having to download the free but enormous Xcode (1.68 GB!!!) ? Otherwise, could someone be so kind and send me the application or a link to it? Many thanks in advance!
-
Hello All. I sometimes find this errors on my logs: ORA-07445: exception encountered: core dump [evaopn2()+104] [SIGSEGV] [Address not mapped to object] [0x0] [] [] My database is a 10.2.0.3 on Linux 32, everything but the logs seems normal. I don't