Announcement

Collapse
No announcement yet.

Compare two dates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Compare two dates

    Hi all,

    After finding here a great solution to my issue in August, i come back again to ask you something.

    I have create a "release date" date for products that i call : "Date de sortie" (French website )

    I want Actinic to print this date and the sentence before this date only if the date is after the current date.

    So I do it like this :

    I put a block if with those conditions : Current Date > Date de Sortie

    And inside the block if i put my sentence.

    But, cause there's always a but, the current date variable is always 01/01/2006.

    That bring me to my 2 questions :

    1) Is it because i'm the preview mode and that the website is not live ?

    2) Is the CurrentDate printing day/month/year or month/day/year ?
    If this is month/day/year, i assume that i will need to create a variable myself (i.e "Date du jour") and putting an echo date("d/m/Y"); in it.

    Best regards,

    Paerrard

    #2
    Hi,

    The 'CurrentDate' variable only works on the receipt page so you won't be able to use it anywhere else I'm afraid. Also 'block ifs' don't work online. They are used when the site is generated. I think you would have to use javascript to do what you want.
    ********************
    Tracey
    SellerDeck

    Comment


      #3
      Hi Tracey,

      Thanks for your answer. I'll try to do it in javascript as you said.

      Paerrard

      Comment

      Working...
      X