×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

get Date format as string

get Date format as string

get Date format as string

(OP)
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.

RE: get Date format as string


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
http://www.wjcitycouncil.com
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: get Date format as string

(OP)
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?

RE: get Date format as string


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 - http://www.notrob.info
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close