-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date format #44
Comments
I believe it just takes it directly from the DBF data. In PHP you can handle it like this: <?php
$parsed = date_parse($dateString); //$dateString is the result from php-xbase
$formatted = sprintf('%04d/%02d/%02d', $parsed['day'], $parsed['month'], $parsed['year']); |
Hi again! I figured out that the php-xbase took the actual "date" value from the DBF and transformed it into a unix timestamp by default. What I did is take that default unix stamp and format it as I needed:
|
👍 👍 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi; I want to thank you for this amazing code. It's helping me a LOT.
However, I'm having problems with fields that are of DATE data type. Somehow instead of getting them in php as "04/31/2017" when I use it (and the actual foxpro DBF table has it saved in this format) I receive "Wednesday, April 31 2017 00:00:01".
How do I set up the date format when receiving the value from the DBF?
Thank you
The text was updated successfully, but these errors were encountered: