Zum Hauptinhalt gehen

Suche

Suche

Non-standard Date Formats

Kommentare

2 Kommentare

  • Avatar
    Gene Henson
    Hello,

    You can use the following script to build the correct date:


    [quote]
    'These variables hold each part of the date and the date to be modified
    dim sDay, sMonth, sYear, sDate

    'Set this variable to your database field that holds the date
    sDate = NOW

    'Here we build the day, month, and year separately
    sDay = IIF(len(DatePart("d",sDate)<2), 0 & DatePart("d", sDate), DatePart("d", sDate))
    sMonth = MonthName(DatePart("m", sDate), True)
    sYear = DatePart("yyyy", sDate)

    'Then we just combine the three values
    value = sday & sMonth & sYear
    [/quote]

    I split it up so that you can see each part of the date being built in case you want to adjust anything.

    Just set the sDate variable to whatever field holds the date that needs to be modified.

    Hope that helps!
    0
  • Avatar
    Legacy Poster
    Thanks for the help Gene.

    It appears to be passsing the data properly but when I look at the label format in the editor, it shows "<script ERROR>" where my date should be on the label.

    That appears to only be a cosmetic issue though.

    Robert
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.