Date in this format "YYYYMMDD"

Hi,

Can any one please let me know how to get this date format YYYMMDD. i.e todays date is 6 August 2009. and the date format should return me 20090806.

is there any predefined function to fetch me the date in this format, or can we set the dateformat to this format : 'yyyymmdd'.

Please let me know in case of any further information required.

Thanks in advance

Comments

  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    The format string for this is "%Y%m%d". You can use this format in the formattedTime function for one-time use:
    put formattedTime("%Y%m%d") -- 20090806
    put formattedTime("%Y%m%d", "July 4") -- 20090704
    

    Or, if you want that format used as the standard date format you can do it like this:
    set the timeFormat.date to "%Y%m%d" -- change the date format
    put the date -- 20090806
    put date("July 4, 1776") -- 17760704
    
Sign In or Register to comment.