Normal Topic Date Format in Merge Documents (Read 5440 times)
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Date Format in Merge Documents
Jan 19th, 2005 at 4:56pm
Print Post Print Post  
I know that Sesame stores date as YYYY/MM/DD and I have formatted my forms to show the date as 19 January 2005, (this is our normal date format in the U.K.) however when I export to a merge document the date is shown as 2005/01/19.  Is there a way round this?

Thanks very much

Don
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Date Format in Merge Documents
Reply #1 - Jan 19th, 2005 at 5:02pm
Print Post Print Post  
Hello Don,

If you are using Microsoft Word, then you will want to use word's field switches. If you are using another Word Processor let me know and I will try to find an equivalent for that word processor.

Firstly, in your merge document, show the field code rather than the result. To do this click on the field and press Shift F9, or press Alt F9 to toggle all field codes.

Click at the end of the field code and add the appropriate switch.  For example, change ..

{MERGEFIELD Date}
to
{MERGEFIELD Date \@ "MMMM dd, yy"}

Where "Date" is the column heading ("field name") of the field in question. The field code starts with the \ character.

By this means you can vary the number of decimal places for numbers, format dates any way you want, and turn numbers into currency amounts. Here are some examples...

dates

\@ "MM/dd/yyyy"     produces         11/19/2003
\@ "MM-dd-yy"      produces         11-19-03
\@ "dd MMM yy"      produces         19 Nov 03
\@ "dddd, MMMM d, yyyy"   produces    Wednesday, November 19, 2003

Numbers & Currency

Example = 1237.852941

\#0.00      produces  1237.85
\#0      produces             38
\#$#,###.00      produces      $  1,237.85
\#£#,###      produces      £  1,238


Text

\* Upper      produces  NY  from "ny"
\* Caps    produces   New York  from "new york"

Once you've set the field code, press Shift F9 to display the value again. Don't be alarmed - it will still show the previous formatting. Press F9 to 'refresh' the field.

This is described in the Programming Guide pages 242-243.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Date Format in Merge Documents
Reply #2 - Jan 19th, 2005 at 5:09pm
Print Post Print Post  
Hello Ray

Thanks for the quick reply.  I am using Microsoft Word 2000 and will try your suggestions.  I am a bit of a novice at this.

Don
  
Back to top
 
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Date Format in Merge Documents
Reply #3 - Jan 19th, 2005 at 5:23pm
Print Post Print Post  
Hello Ray

Thanks a million it works perfectly.

Don
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Date Format in Merge Documents
Reply #4 - Jan 19th, 2005 at 5:25pm
Print Post Print Post  
Hello Don,

Glad to hear that it worked for you.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged