Function module to convert to time stamp format
Hi friends,
can you tell me any function module to convert date and time to time stamp format?
kind regards.
Just use
CONVERT DATE d
TIME t [DAYLIGHT SAVING TIME dst]
INTO TIME STAMP tst
TIME ZONE tz.
look at this example
DATA:
tstamp type timestamp,
d TYPE D VALUE '19971224',
t TYPE T VALUE '235500'.
SET COUNTRY 'US'.
CONVERT DATE d TIME t INTO
TIME STAMP tstamp TIME ZONE 'UTC+12'.
" tstamp : 19971224115500
" (12/24/1997 11:55:00)
CONVERT TIME STAMP tstamp TIME ZONE 'UTC+12' INTO
DATE d TIME t.
Also look at the blog..
/people/himanshu.gupta/blog/2006/11/14/abap4-date-time-and-timestamps
Raja T
Message was edited by:
Raja Thangamani
Similar Messages
-
Need function module to convert system time to local time
Hi Experts,
Need function module to convert system time to local time.
i.e country specific that to in HH:MM format.
Thanks in advance.Dear Prince,
Kindly check the following link which contains the list of function modules for date and time conversion.
[http://www.sap-img.com/abap/date-month-pop-related-function-modules.htm]
Regards -
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 -
Problem with Time stamp function module for converting US to Japan
Hi All,
I need standard function module for converting US Timestamp to Japan, Can any one let me know is there any standard function modules.
thanks in advance!
Regards,
Kalidas.T
Edited by: Kalidas Thirumoorthy on May 5, 2009 5:29 PM
Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM
Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PMTry this way:
CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
<tst> is of type P(8) or P(11) with 7 decimal places
<tz> of type C(6)
Refer to help.sap.com for more details. -
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,
MRREPORT 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. -
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 -
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 -
Is there any function module to convert the date format
Dear ABAPers,
Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
Thanks & Regards,
Ashok.hi,
create custom function module or copy the below code in the report ..and use it
the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
""Local interface:
*" IMPORTING
*" VALUE(DATE) LIKE SY-DATUM
*" EXPORTING
*" VALUE(FORMATTED_DATE)
*" EXCEPTIONS
*" INVALID_DATE
TABLES: TTDTG.
DATA: BEGIN OF T_DATE,
YYYY(4) TYPE C,
MM(2) TYPE C,
DD(2) TYPE C,
END OF T_DATE.
DATA: DAY(3) TYPE N.
DATA: VARNAME LIKE TTDTG-VARNAME.
IF DATE IS INITIAL.
CLEAR FORMATTED_DATE.
EXIT.
ENDIF.
check document date format
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = DATE
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1.
IF SY-SUBRC NE 0.
RAISE INVALID_DATE.
ENDIF.
MOVE DATE TO T_DATE.
CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
WRITE T_DATE-DD TO DAY.
CONCATENATE DAY ',' INTO DAY.
CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
SEPARATED BY SPACE.
ENDFUNCTION.
the output is :--Convert a DATE field into a full format date eg. March 23, 2000
Regards,
Prabhudas -
Function Module to convert Current Date & Time to Julain Date.
Hi Guys,
Is there any Function Module for converting Current system Date to Julian Date.
I only want a Function Module not any report program.
Thanks......
Sudheer.hiii
i tried to find a FM for that but could not find any..ya after reading this thread i read about how julian date can be make..from this link only i read about Julian date
and for this time is also needed but i think there is not any FM for this.still i am searching.let me know if you get any. -
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 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 -
Is there any function module to convert hexadecimal format to normal decima
Hi,
is there any function module to convert hexadecimal format to normal decimals.
Regards,
Nandha.HI Naddy,
simply do this..
parameters : num1(5) type x.
data : dec type i.
dec = num1.
write : dec.
remember to pad the input with zeros
regards
satesh -
Function Modules for Data and Time
Hi all,
I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
Thanks in advanceHi Ranjith,
i think this will b usefull for you..
SAP Bar Chart Function Modules and what they are used for
Function module
Used for
BARC_GRAPHIC_PBO
Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
BARC_GRAPHIC_PAI
Analyzing data returned by the graphic
BARC_SET_TIME_AXIS
Setting start and end of time axis
BARC_SET_OPTIONS
Setting options
BARC_ADD_CHART
Creating a chart
BARC_SET_CHART_ATTRIB
Setting chart attributes
BARC_ADD_SECTION
Creating a section on the time axis
BARC_SET_SECTION_ATTRIB
Setting section attributes
BARC_ADD_RIBBON
Adding a ribbon to the time axis
BARC_SET_RIBBON_ATTRIB
Setting attributes for ribbons in the chart
BARC_ADD_GRID
Adding a time grid
BARC_SET_GRID_ATTRIB
Setting grid attributes
BARC_ADD_LAYER
Adding a layer (graphic elements)
BARC_SET_LAYER_ATTRIB
Setting layer attributes
BARC_ADD_LINE
Adding a line
BARC_ADD_CALENDAR
Creating a calendar
BARC_SET_CALENDAR_ATTRIB
Setting attributes for a calendar
BARC_ADD_TIME_PROFILE
Creating time profiles
BARC_SET_TIME_PROFILE_ATTRIB
Setting attributes for time profile
BARC_ADD_INTERVAL
Adding a time interval
BARC_SET_INTERVAL_ATTRIB
Setting time interval attributes
BARC_ADD_TIME_OBJECT
Creating a time object
BARC_CONVERT_DATE
Creating a date string in bar chart format
BARC_REVERT_DATE
Converting a date string in bar chart format to date and time
BARC_ADD_DATELINE
Creating a date line
BARC_SET_DATELINE_ATTRIB
Setting dateline attributes
BARC_GET_PROFILE_CONTENTS
Obtaining profile contents for customizing a chart
BARC_GET_COLUMN_WIDTH
Selecting new column width
BARC_SET_COLUMN_WIDTH
Setting the column width
BARC_GET_TEXTINDEX
Obtaining the text index of a field
BARC_SET_LABELS
Positioning the chart display
BARC_SET_COLUMN_ATTRIB
Setting column attributes
BARC_SET_ROW_ATTRIB
Setting row attributes
BARC_SET_ROW_HEIGHT
Setting the line height
BARC_SET_MAXCHARTS
Setting the maximum number of charts sent
<b>If its usefull reward points
</b> -
Function module which convert number to days to date
Hi,
Any one knows any function module which convert total number of days into date.
thnaks,
shilpa kHi,
FIMA_DAYS_AND_MONTHS_AND_YEARS
FI_PSO_DAYS_MONTHS_YEARS_GET
RSSM_CONVERT_DAYSEC2TIMESTAMP
RSSM_CONVERT_TIMESTAMP2DAYSEC
Function Modules related to Date and Time Calculations
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
Regards
Maybe you are looking for
-
How do I print an 8"x10" photo on my HP 7525 printer.
The drop-down options for print size on my HP 7525 don't show 8"x10". I have the usual 4"x6", 3.5"x5" and 5"x7", then 10x15cm, 2L, Japanese Postcard, A6, L, 10x15 tab, 4x6" tab, 13x18ccm and Index card. But no choice for 8"x10". What must I do to pri
-
PDF will not print please help
I am using Win7 64, updated print driver, updated Adobe. When I try to print a pdf document it will not print unless I restart my computer for each document. I can print Word documents but not pdfs.
-
Why are the buttons not visible at program start?
Can anybody tell me why the buttons are invisible at Program start? They are only then visible, if the client are is invalidated, in other words, if i resize/minimize the window etc. public class Calculator extends Frame private Button[] button; priv
-
FB60-No display of special gl transaction
Hi, in the T.code FB60 special g/l transaction symbols are not displayed. According to my client he want to post special g/l transactions in FB60 only. he dont want F-43 and anyother. When i want to in FB60. to choose a special gl indicator the syste
-
Where can I find java algorithms and classes
Does anyone here know about places on the net where you can download algorithms and classes written in Java? I am looking for a method/class that is able to do the following: Given a mispelled word. Find the word in a word list that best matches this