BLHTML.org

BLHTML.org / Web Programming / BLHTML / BLHTML Manual / BLHTML funktion list / BLHTML funktion list /

 
  WHEN 3346 0
#WHEN# is an independent function
Rights to use this function #WHEN#:
  • All

  • #WHEN# Print out time format

    values:     defaults:  description:
    valueVariable or string to be convert to date format
    typeminText in forum: Edited: 2005-09-09 05:47
    spaceSPACECharacters that distinguish the date values
    blhtmlblhtml=on BLHTML executes WHEN
    returnreturn=variable stores the results in $variable

    type:
    10 character style: YYMMDDHHMM
    Formatutresultat
    min2005-09-09 05:47

    6 character style: YYMMDD
    typeutresultat
    dayDD MONTH YYYY
    datumYYYY MONTH DD
    dayDD MM YYYY
    dateYYYY MM DD
    oldYY MM DD

    Example:
    #WHEN value(#GETDATE#) type=dag blhtml=on return=nu#
    Today is: #$nu#<br>
    // Output: Today is: 11 November 2005

    old: #WHEN value=051008 type=old space=-#<br>
    // Output: old: 05-10-08

    #$date=051008#
    date: #WHEN value=$date type=datum space=/#
    // Output: date: 2005/Oktober/08

    Returns:
    Today is:
    old: 05-10-08
    date: 2005/Oktober/08

    DATE -> GETDATE -> WHEN:
    U =
    #DATE value=U#<br>
    GETDATE =
    #GETDATE type=U value(#DATE value=U#) blhtml=on#<br>
    WHEN =
    #WHEN
            type=date space(-)
            value(#GETDATE type=U value(#DATE value=U#) blhtml=on#) blhtml=on
    #
    <br>
    TIME =
    #WHEN
            type=min space(/)
            value(#GETDATE type=U format=min value(#DATE value=U#) blhtml=on#) blhtml=on
    #

    Returns:
    U = 1531854910
    GETDATE = 180717
    WHEN = 2018-07-17
    TIME = 2018/07/17 19:15

    More information:
  • #GETDATE#
  • #DATE#
  • PHP helpsection: date
  • BLHTML forum  


    apache MySQL PHP No to software patents! BLHTML
    © 2003, 2010 BLHTML
    This page is created with BLHTML in 0.0589 seconds