Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member jf1288's Avatar
    Join Date
    Sep 2003
    Posts
    215
    Member #
    3300
    Is there a function (something like mkdate() ) that could turn a number in the yymmdd format into mmm dd, yyyy? so 031123 would become Nov 23, 2003.

    I actually only want the mmm dd with no year, so if thats possible please let me know.
    If its not in Family Guy its not worth it.

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    why not use substring()?

  4. #3
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Agreed... like this

    <?
    $dt="031123";

    $yy = substr($dt,0,2);
    $mm = substr($dt,2,2);
    $dd = substr($dt,4,2);

    $ts=mktime(0,0,0,$mm,$dd,$yy);

    print date("M j, Y",$ts);
    ?>

    Sean

  5. #4
    Member Seraph's Avatar
    Join Date
    Sep 2003
    Posts
    81
    Member #
    3090
    I would always suggest storing dates in unix format to allow more presice times and also to make it easier to convert times and prevent situations like this


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:34 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com