Normal Topic Date Format (Read 553 times)
Larry
Member
*
Offline


No personal text

Posts: 8
Joined: Jan 22nd, 2006
Date Format
Jan 22nd, 2006 at 7:02pm
Print Post Print Post  
i am exporting data from two date fields along with other texr data to ms word to print labels. the display date format in sesame is the way i want it on the labels.
mm/dd/yyyy.
but when i merge the data the format that shows up in word is backwards. yyyy/dd/mm.
i am also creating macros to do this for me.
is there a way to get the correct date format in word?
Thanks
Larry
  
Back to top
 
IP Logged
 
wildwood
Full Member
***
Offline


No personal text

Posts: 156
Location: New York
Joined: Apr 2nd, 2004
Re: Date Format
Reply #1 - Jan 22nd, 2006 at 9:58pm
Print Post Print Post  
Hey Larry
Look in the programming guide - appendix 2 page 242. Should help you, I've used it for the same reason and to format dollar amounts as well.

Peter
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Date Format
Reply #2 - Jan 23rd, 2006 at 12:35am
Print Post Print Post  
Hi Larry.

Sesame stores all dates internally in the format yyyy/mm/dd.
Numbers are stored internally with six decimal places and exported numbers will be in a format containing 6 decimals.

That is what will be exported to all other programs,not just to Word.
=====================================
In Word, you can do the following:
Go the the Merge Field.
Right click on the merge field, and select Toggle Field Codes
You will see something like this: {MERGEFIELD "DateField"}
Edit that and insert the following:  \@MM/dd/yyyy at the end, after the quotes, before the }, so you end up with this:
{MERGEFIELD "DateField" \@MM/dd/yyyy}

This will end up with a date format like 10/09/2005

See Word Help for other formats. 
Search Help for "Format merged data" without the quotes

Some other examples:
\@ "MMMM d, yyyy will give you October 9, 2005
\# ###### will give 6 digit number, no punctuation, no decimals.........123456
\# ##.0 will give 2 digit number, one decimal place, no leading zeroes............2.3
\# $###.00 will give currency with leading $, two decimals..........$123.45

« Last Edit: Jan 26th, 2006 at 9:38pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Larry
Member
*
Offline


No personal text

Posts: 8
Joined: Jan 22nd, 2006
Re: Date Format
Reply #3 - Jan 26th, 2006 at 9:32pm
Print Post Print Post  
Thanks for the help.
Worked like a charm.
Larry
  
Back to top
 
IP Logged