[Archived] QuoteWerks Support Forum - New Forum: https://tickets.quotewerks.com/support/discussions
[Archived] QuoteWerks Support Forum - New Forum: https://tickets.quotewerks.com/support/discussions
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 QuoteValet
 QuoteValet Templates
 QuoteValet Template Date Formats
 Forum Locked
 Printer Friendly
Author Topic  

stevesiggs
QuoteWerks Genius

United Kingdom
2163 Posts

Posted - 04/05/2016 :  06:35:42  Show Profile  Visit stevesiggs's Homepage
Has anyone worked out how to set a date format in QuoteValet...?

By default it's MMM dd yyyy but we'd like dd MMM yyyy. The below is about as close as I've got but implementing the commented out line returned nothing.


    [Begin_ExpirationDateIsSet]
    <div id="expiration-date">
        <p id="expirationdate"></p>

        <script type="text/javascript">

          var myDate = new Date();
          //var myDate = new Date([QV_ExpirationDate]);

          var month=new Array();
          month[0]="January";
          month[1]="February";
          month[2]="March";
          month[3]="April";
          month[4]="May";
          month[5]="June";
          month[6]="July";
          month[7]="August";
          month[8]="September";
          month[9]="October";
          month[10]="November";
          month[11]="December";

          document.getElementById("expirationdate").innerHTML = "Quote expires " + myDate.getDay()+" "+month[myDate.getMonth()]+" "+myDate.getFullYear();
        </script>

    </div>
    [End_ExpirationDateIsSet]

Stephen Siggs
Hilltops IT / ConnectIt Software
QuoteWerks Solution & Development Partner since 2005

Skype: stephen.siggs
Tel: +44(0) 344 357 7360
Cell: +44(0) 7875 423661
Email: steve@hilltopsit.co.uk
QuoteWerks services - www.hilltopsit.co.uk/quotewerks
QuoteWerks add-ons - www.connectit-software.co.uk

MattPrestige
QuoteWerks Genius

United Kingdom
531 Posts

Posted - 04/05/2016 :  07:11:12  Show Profile  Visit MattPrestige's Homepage
Overcomplicating it, Sir!

Try something like this: [DH_DocDate:DateFormatString=dd MMMM yyyy]

QuoteWerks MVP for 7 years
Remote QuoteWerks consultancy for companies globally.

matt@prestigequoting.com
www.prestigequoting.com
Go to Top of Page

stevesiggs
QuoteWerks Genius

United Kingdom
2163 Posts

Posted - 04/05/2016 :  07:15:36  Show Profile  Visit stevesiggs's Homepage
quote:
Originally posted by MattPrestige

Try something like this: [DH_DocDate:DateFormatString=dd MMMM yyyy]


Beautiful! :)

Thanks Matt!

Stephen Siggs
Hilltops IT / ConnectIt Software
QuoteWerks Solution & Development Partner since 2005

Skype: stephen.siggs
Tel: +44(0) 344 357 7360
Cell: +44(0) 7875 423661
Email: steve@hilltopsit.co.uk
QuoteWerks services - www.hilltopsit.co.uk/quotewerks
QuoteWerks add-ons - www.connectit-software.co.uk
Go to Top of Page
  Topic  
 Forum Locked
 Printer Friendly
Jump To:
[Archived] QuoteWerks Support Forum - New Forum: https://tickets.quotewerks.com/support/discussions © Aspire Technologies, Inc Go To Top Of Page
Snitz Forums 2000