These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Date Fields

krm240
Registered: Apr 17 2009
Posts: 95
Answered

HI, trying to import a date field from a Sql2005 database
The issue is the field is a date/time format in the SQL DB (unable to change)
The field display and edit format I want is date only. (MMMM YYYY)

Having troubles with this, tried various methods but not successful.
Anyone have a suggestion as to where I need to look for a solution?

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You can use the 'Date2Num()' function to convert the date string from the database to the number of days from the epoch date using the appropriate format for the provided date string. Then you can use the 'Num2Date()' function to convert the days from the epoch date to the optionally provided format parameter. You will be placing the formatted string into a date field with the proper format or a text field.

George Kaiser

krm240
Registered: Apr 17 2009
Posts: 95
Looks good, will try it.
Any javascript solution? Trying my best to stick to one script language.
krm240
Registered: Apr 17 2009
Posts: 95
Still looking for a Java script solution or explanation of date fields
See a link to a possible solution mentioned a few times
Here is a link to Part 1-

http://www.acrobatusers.com/tech_corner … ime_part1/

But the link is dead...
Can this link be reloaded?
jonom
Registered: Jan 31 2008
Posts: 133
krm240 wrote:
Looks good, will try it.
Any javascript solution? Trying my best to stick to one script language.
Dealing with dates is way easier in FormCalc - use whatever works best, unless you have a specific reason to only use JavaScript.