Date Format in DD-MM-YYYY in Module Pool

Hi,
How can I show date in DD-MM-YYYY Format in Module Pool
Thanks

declare a field of length 10  in ur screen and use this logic
data :  gv_datum(10) type c,
          gv_dt like sy-datum.
        gv_dt = sy-datum.           "here u can give the date field .
  CONCATENATE gv_dt+6(2) gv_dt+4(2) gv_dt+0(4)
        INTO gv_datum
        SEPARATED BY '-'.
write:/ gv_datum.
regards,
vijay

Similar Messages

  • Function module to get any date format in DD.MM.YYYY

    Hi  Experts,
    i want a FM which can convert any type of date format user entered on selection screen in DD.MM.YYYY
    date format entered by user  can be any of below format
    DD/MM/YYYY
    MM/DD/YYYYY
    DD/MMM/YYYY
    MM.DD.YYYY
    YYYY/MM/DD
    i want date format in DD.MM.YYYY
    Also is there any FM  which can tell  us that  day of today date is  25th or  not .

    Read forum rules of engagement before posting.
    Basic date posts are not permitted.

  • How to convert date format to MM/DD/YYYY

    Hi,
       How to convert date format to MM/DD/YYYY.
    Thanks,
    Senthil

    hi,
    tri with this function module
    data :l_date(10) type c
    CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
    EXPORTING
       DATE_INTERNAL                  = SY-DATUM
    IMPORTING
       DATE_EXTERNAL                  = l_date.
    this function module converts date from 20050601 to external format  which is specified in user profile
    cheers,
    sasi

  • How do I get the date format of MM/DD/YYYY to be recognized in Numbers?

    I recently switched from Windows and Excel.  All the bank details that I export from my bank have dates formatted as mm/dd/yyyy.  Excel has no issues dealing with this but Numbers will not recognize the cell contents as a date.  Any help?

    I have similar problems with data copied & pasted from a banking web page into Numbers. I always first check to see that the cells are formatted as date & time, but that doesn't always fix the problem. The problem usually ends up being spaces before and/or after the numbers in a cell.

  • How to change data format from  MM/DD/YYYY to DD/MM/YYYY

    HI,
    How can we change data format from MM/DD/YYYY to DD/MM/YYYY in Prompt and Report Level in obiee 11g.
    Please help me ont this.
    Thanks

    Hi,
    In Prompt:
    Try using EVALUATE function.
    Eg: Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'DD-MON-YYYY')
    Report level:
    Try this in the column formula-
    Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'MM/DD/YYYY')
    (or)
    EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), "Dim- Date".Start Date, 'MON-YY')
    http://108obiee.blogspot.in/2009/03/how-to-change-date-format-mask-in-date.html
    http://obiee-bip.blogspot.in/2011/08/customizing-obiee-calendar-display.html
    Some other methods.
    Metdhod 1:
    'Save System-Wide Column Formats' Option
    Check this.
    http://siebel-essentials.blogspot.com/2010/10/11-obiee-11g-tips-9-system-wide.html?m=1
    Thanks
    satya

  • How can I change defaut date format to dd-mon-yyyy in bi analytics

    hi..
    How can I change the default date format to DD-MON-YYYY in BI Analytics...
    I am passing a date in a report from a prompt....but it is always taking "dd-mon-yyyy hh:mm:ss" format...I want to input the prompt in oracle's default date format i.e dd-mon-yyyy..
    please help...I dont want to use cast function because it will convert the date into a character value....I want a date...

    Hi USer
    Try this link
    How to change date format in OBIEE
    Re: repository variable at date prompt
    Thanks
    Diney

  • Convert the date of string to datetime format 'MM/dd/yyyy' when the system date format is 'dd/MM/yyyy'.

    I need convert the date of string format 'MM/dd/yyyy' to datetime format 'MM/dd/yyyy' when the system date format is 'dd/MM/yyyy'.Since
    I need to search values based on date where my database datetime  is 'MM/dd/yyyy' format.

    In my opinion you should re-consider the assumption that the date picker returns a string. Maybe it is able to return a
    DateTime object directly instead of string. Then you will pass this value as a parameter of SQL query. This should work regardless of computer configuration.
    Otherwise, follow the previous string-based approaches.

  • Re:How to pick the date format as dd/MM/yyyy from the database

    Hi all,
    I am using JDev 11.1.2.3.0
    My requirement is ,i want to pick the date from the database as dd/MM/yyyy format.I set the attribute as
    r1.setAttribute("JobDescription",
    "From" + olrow.getAttribute("PeriodFrom") + "To" + olrow.getAttribute("PeriodTo")
    here periodFrom and periodTo are the date attributes.i set periodFrom and periodTo date format as dd/mm/yyyy in the VO.on UI page it is showing dd/mm/yyyy format.but it is storing in the database as yyyy/mm/dd format.Here my problem is when i set periodFrom and periodTo values to the JobDescription,the JobDescription format is showing yyy/mm/dd format.here i want to show the JobDescription also dd/mm/yyyy format on the UI page.here JobDescriptin type is string.can anyone help me out please...
    Thanks,
    G.Shilpa

    Hi,
    you can use SimpleDateFormat to parse Date objects to formatted Strings
    SimpleDateFormat (Java Platform SE 7 )
    Note that dependent in your Date type you may deal with Date or SQL Date in ADF BC. SqlDate woild need to be converted to Date first and then parsed into a formatted String. I suggest you Google for SimpleDateFormat examples
    Frank

  • How to keep date format as dd/mm/yyyy in Agentry independent of backend value format?

    I am using Agentry 6.0.38.1 android client and 6.0.32 plugin.
    I want to keep date format as dd/mm/yyyy in Agentry independent of backend value date format.
    How can I do it?
    Regards
    -Prit

    Jason/Sravanthi
    When I log in with 6.0.38.1 android client, I get date format in dd/mm/yyyy independent of device date format (I checked by changing device date format) and when I log in with 6.0.30.x android client, I get date format in mm/dd/yyyy independent of device date format for the same export to same connection.
    Don't know why this is happening.
    Sravanthi,
    The solution you suggested didnt work
    Regards
    Prit

  • In Cube date format is MM/DD/YYYY but in report DD/MM/YYYY ?

    Dear All,
                    The date format at cube level is MM/DD/YYYY but when executes that report the date format is coming in report as DD/MM/YYYY.how it happened i want the same format as cube in my report also .please anybody can suggest me where it is going wrong and how to rectify at report level.
    Thanks & Regards
    sathish

    Hi,
    Use the FM >CONVERSION_EXIT_PDATE_INPUT and use concatenate statement and then change the formate and pass teh value to Customer Exit Variable, else Change the formate in SU01>User ID >Display>Default Tab and change there.
    See some Sample code: Change the code for your requirement.
    WHEN 'ZCALDAY' .
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZDAY'.
            IF sy-subrc = 0.
              CLEAR: l_s_range.
              l_s_range-low+0(2) = loc_var_range-low+6(2).
              l_s_range-low+2(1) = '/'.
              l_s_range-low+3(2) = loc_var_range-low+4(2).
              l_s_range-low+5(1) ='/'.
              l_s_range-low+6(4) = loc_var_range-low+0(4).
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ENDLOOP.
    Thanks
    Reddy
    Edited by: Surendra Reddy on Mar 24, 2009 9:08 AM

  • Date format as mm/dd/yyyy instead of dd.mm.yyyy

    Hi Experts,
    I have a data field which get the data in yyymmdd format from the flat file and displays in my report as mm/dd/yyyy format.
    I checked in SU01D the format is dd.mm.yyyy and this is the format i want the date to be displayed in the report.
    Can you anyone tell me what could be the issue please.
    Thanks

    Hi,
    Please refer to
    Date Format in BEx Analyser
    How to get year format result on date format in Bex
    How to change Date format in Bex to DD/MM/YYYY
    hope this helps.
    Regards
    Raj

  • Date Format in MM/DD/YYYY ???

    Seems all date formats are DD/MM/YY or Date first, Month, then year. All my dates for one spreadsheet are in MM/DD/YYYY but I can't seem to find that date format anywhere? Can I create my own?

    Hello
    What is your System Setting in the "System Preference" named "International" ?
    I guess that it is set to a country which, like the France, uses the format DD/MM/YYYY
    If you select a setting like the American one you will be able to use MM/DD/YYYY.
    Yvan KOENIG (from FRANCE mardi 11 mars 2008 22:27:2)

  • Converting Oracle 7-Byte Internal Date FOrmat to MM/DD/YYYY format.

    I can get the date stored in the database in 7-Byte Internal representation.
    I want to convert this number to mm/dd/yyyy format,using PRO*C-SQLDA(Method 4),overriding any NLS DATE Format.
    null

    Only Oracle Spatial questions
    here please.
    null

  • Change of date format to MM/DD/YYYY in ITS web HTML screen.

    Hi all
    I am facing problem in displaying date field on the HTML for the data coming from SAP back end.
    Earlier my screen was also showing the date in the format MM/DD/YYYY but suddenly it started showing date in the format DD.MM.YYYY. I have not changed any code on the front end HTML side.
    At sap back end the FM is returning the date in the format MM/DD/YYYY and same data i have to display on the HTML screen.
    But it is not showing the data as in the back end format.
    Please help me in resolving this issue. as it is bit Urgent.
    Thanks
    Ekta

    Hi Tobias,
    Thanks for the reply. I will see to your suggestion. Because the Custom login Id created for login to the service, needs to be checked whether the date format for that user may not be of the type DD/MM/YYYY.
    Thanks a lot. I will let you know about it after checking.
    Thanks & Regards
    Ekta

  • INSERT & UPDATE changing date format to mm/dd/yyyy!!!

    I have INSERT & UPDATE ASP/VB forms which have a date
    field which submits to
    Access....except when the date is entered as dd/mm/yyyy, it
    decides to
    convert it to mm/dd/yyyy....absolutely terrific!! :o((
    I've added this:
    <% Session.LCID = 2057 %>
    I've checked the date format, I've done absolutely everything
    I can think
    of, and can source on the newsgroups, but NOTHING.
    What, on earth, is going on??????????????
    If anyone can help save me from this madness, please tell me
    why this is
    happening?
    I'm using ASP/VB, with Access on a Windows server and, up
    until now, I've
    never had this problem.
    Here's my INSERT code:
    <%@LANGUAGE="VBSCRIPT"%>
    <% Session.LCID = 2057 %>
    <!--#include file="../Connections/dsnNAME.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" &
    Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "form1") Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_dsnNAME_STRING
    MM_editCmd.CommandText = "INSERT INTO tblNews (newstitle,
    newsdate,
    newsenddate, thumbnail, largeimage, newstextsnip, newstext,
    emailcontact,
    urllink, [include]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    1, 75, Request.Form("newstitle")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 135,
    1, -1, MM_IIF(Request.Form("newsdate"),
    Request.Form("newsdate"), null)) '
    adDBTimeStamp
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 135,
    1, -1, MM_IIF(Request.Form("newsenddate"),
    Request.Form("newsenddate"),
    null)) ' adDBTimeStamp
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    1, 75, Request.Form("thumbnail")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    1, 75, Request.Form("largeimage")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    1, 536870910, Request.Form("newstextsnip")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    1, 536870910, Request.Form("newstext")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 202,
    1, 75, Request.Form("emailcontact")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    1, 75, Request.Form("urllink")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 5,
    1, -1, MM_IIF(Request.Form("include"), 1, 0)) ' adDouble
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "confirm.htm"
    If (Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
    Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    %>
    Thanks.
    Nath.

    Well, I've established that it's DW8.0.2 that is causing this
    strange
    occurence.
    Reverted back to previously created versions of my
    INSERT/UPDATE form pages
    (created in DWMX) and it all works fine!!
    I think that makes the whole situation even more frustrating
    because I had
    HUGE problems with this back in 2003/2004, and resolved it.
    Now I've upgraded to DW8.0.2 and it's all gone "ape" again.
    <sigh>
    Any ideas, looking at the code in my initial post, why this
    is happening?
    For comparison here is the same INSERT created in DWMX that
    WORKS:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/dsnNAME.asp" -->
    <%
    ' *** Edit Operations: declare variables
    Dim MM_editAction
    Dim MM_abortEdit
    Dim MM_editQuery
    Dim MM_editCmd
    Dim MM_editConnection
    Dim MM_editTable
    Dim MM_editRedirectUrl
    Dim MM_editColumn
    Dim MM_recordId
    Dim MM_fieldsStr
    Dim MM_columnsStr
    Dim MM_fields
    Dim MM_columns
    Dim MM_typeArray
    Dim MM_formVal
    Dim MM_delim
    Dim MM_altVal
    Dim MM_emptyVal
    Dim MM_i
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" &
    Request.QueryString
    End If
    ' boolean to abort record edit
    MM_abortEdit = false
    ' query string to execute
    MM_editQuery = ""
    %>
    <%
    ' *** Insert Record: set variables
    If (CStr(Request("MM_insert")) = "form1") Then
    MM_editConnection = MM_dsnNAME_STRING
    MM_editTable = "tblNews"
    MM_editRedirectUrl = "confirm.htm"
    MM_fieldsStr =
    "newstitle|value|newsenddate|value|thumbnail|value|largeimage|value|newstextsnip|value|ne wstext|value|emailcontact|value|urllink|value|include|value"
    MM_columnsStr =
    "newstitle|',none,''|newsenddate|',none,NULL|thumbnail|',none,''|largeimage|',none,''|new stextsnip|',none,''|newstext|',none,''|emailcontact|',none,''|urllink|',none,''|include|no ne,1,0"
    ' create the MM_fields and MM_columns arrays
    MM_fields = Split(MM_fieldsStr, "|")
    MM_columns = Split(MM_columnsStr, "|")
    ' set the form values
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
    Next
    ' append the query string to the redirect URL
    If (MM_editRedirectUrl <> "" And Request.QueryString
    <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
    Request.QueryString <> "") Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    End If
    %>
    <%
    ' *** Insert Record: construct a sql insert statement and
    execute it
    Dim MM_tableValues
    Dim MM_dbValues
    If (CStr(Request("MM_insert")) <> "") Then
    ' create the sql insert statement
    MM_tableValues = ""
    MM_dbValues = ""
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
    MM_formVal = MM_emptyVal
    Else
    If (MM_altVal <> "") Then
    MM_formVal = MM_altVal
    ElseIf (MM_delim = "'") Then ' escape quotes
    MM_formVal = "'" & Replace(MM_formVal,"'","''") &
    Else
    MM_formVal = MM_delim + MM_formVal + MM_delim
    End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
    MM_tableValues = MM_tableValues & ","
    MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
    Next
    MM_editQuery = "insert into " & MM_editTable & " ("
    & MM_tableValues & ")
    values (" & MM_dbValues & ")"
    If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    If (MM_editRedirectUrl <> "") Then
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    End If
    %>
    This type of thing does my HEAD in.
    Nath.
    "tradmusic.com" <[email protected]> wrote in
    message
    news:[email protected]...
    >I have INSERT & UPDATE ASP/VB forms which have a date
    field which submits
    >to Access....except when the date is entered as
    dd/mm/yyyy, it decides to
    >convert it to mm/dd/yyyy....absolutely terrific!! :o((
    >
    > I've added this:
    > <% Session.LCID = 2057 %>
    >
    > I've checked the date format, I've done absolutely
    everything I can think
    > of, and can source on the newsgroups, but NOTHING.
    > What, on earth, is going on??????????????
    >
    > If anyone can help save me from this madness, please
    tell me why this is
    > happening?
    > I'm using ASP/VB, with Access on a Windows server and,
    up until now, I've
    > never had this problem.
    >
    > Here's my INSERT code:
    >
    > <%@LANGUAGE="VBSCRIPT"%>
    > <% Session.LCID = 2057 %>
    > <!--#include file="../Connections/dsnNAME.asp" -->
    > <%
    > Dim MM_editAction
    > MM_editAction =
    CStr(Request.ServerVariables("SCRIPT_NAME"))
    > If (Request.QueryString <> "") Then
    > MM_editAction = MM_editAction & "?" &
    > Server.HTMLEncode(Request.QueryString)
    > End If
    >
    > ' boolean to abort record edit
    > Dim MM_abortEdit
    > MM_abortEdit = false
    > %>
    > <%
    > ' IIf implementation
    > Function MM_IIf(condition, ifTrue, ifFalse)
    > If condition = "" Then
    > MM_IIf = ifFalse
    > Else
    > MM_IIf = ifTrue
    > End If
    > End Function
    > %>
    > <%
    > If (CStr(Request("MM_insert")) = "form1") Then
    > If (Not MM_abortEdit) Then
    > ' execute the insert
    > Dim MM_editCmd
    >
    > Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    > MM_editCmd.ActiveConnection = MM_dsnNAME_STRING
    > MM_editCmd.CommandText = "INSERT INTO tblNews
    (newstitle, newsdate,
    > newsenddate, thumbnail, largeimage, newstextsnip,
    newstext, emailcontact,
    > urllink, [include]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?,
    > MM_editCmd.Prepared = true
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    > 1, 75, Request.Form("newstitle")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 135,
    > 1, -1, MM_IIF(Request.Form("newsdate"),
    Request.Form("newsdate"), null)) '
    > adDBTimeStamp
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 135,
    > 1, -1, MM_IIF(Request.Form("newsenddate"),
    Request.Form("newsenddate"),
    > null)) ' adDBTimeStamp
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    > 1, 75, Request.Form("thumbnail")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    > 1, 75, Request.Form("largeimage")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    > 1, 536870910, Request.Form("newstextsnip")) '
    adLongVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    > 1, 536870910, Request.Form("newstext")) ' adLongVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 202,
    > 1, 75, Request.Form("emailcontact")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1, 75, Request.Form("urllink")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 5,
    > 1, -1, MM_IIF(Request.Form("include"), 1, 0)) ' adDouble
    > MM_editCmd.Execute
    > MM_editCmd.ActiveConnection.Close
    >
    > ' append the query string to the redirect URL
    > Dim MM_editRedirectUrl
    > MM_editRedirectUrl = "confirm.htm"
    > If (Request.QueryString <> "") Then
    > If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) =
    0) Then
    > MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    > Else
    > MM_editRedirectUrl = MM_editRedirectUrl & "&"
    & Request.QueryString
    > End If
    > End If
    > Response.Redirect(MM_editRedirectUrl)
    > End If
    > End If
    > %>
    >
    > Thanks.
    > Nath.
    >

Maybe you are looking for