Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get Date format as string

Status
Not open for further replies.

boon58

Programmer
Aug 7, 2004
5
US
Anybody know how to get the date format as a string in paradox. I need to show the date format next to the dates on my reports. What I want is the date format being used e.g. dd/mm/yyyy
I know I can set the format but different users need to have their machines in different formats so I can't enforce a standard format.
On any reports produced I need to show the date format from the machine that produced it to prevent confusion.

Any help would be really appreciated.
 
The date format isn't set by the machine that created it.

Dates are stored as longint or number, forget which.

To do what you are asking for, you would need to store the format of the date from the workstation creating it when it is create; in another field or an .ini file perhaps.

You may want to check out formatGetSpec in HELP.

Tony McGuire
"It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Thanks Tony,

I appreciate the help but that's not exactly what I need. I need to be able to display on the report the format that the machine is using when it creates the report. For example dd/mm/yyy or mm/dd/yyyy.
The problem is that different users have different settings for the date and I need to show that on the report to prevent confusion. In VB.net I can use CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern()
do you know if paradox has an equivalent?
 
It has what I suggested.

When a system creates a date, get the format on that machine and store the format somewhere.

Then have the machine displaying the data use the stored format for display.

Likely gonna be lots of storage/retrieving, unless only one system usually creates things.

That, or store the date as a date, and have a text field where you store it in the format the user creating it is using - and use the text field for displaying as well.



Tony McGuire
Stop Rob Bennett - "It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top