Jump to content

change the number 2006 into 06


jwk811

Recommended Posts

how about getting the last two digits in a sentence.. because i just relized that i store the date like this: January 14, 2006. How could I make it so it gets just the last two without knowing how many are in the string? Would I have to do a string count and subtract the difference? if thats the way to do it could you help me with that? im not too sure on how to do that either.. thanks!
If you are storing the date in a database, you really should be storing it as a "date" type field. Tell us what you're using to format the date now.

If you store it as a "date" field, you can always display it however you want.

Ken
nevermind forget about that part i got it.. i process it before it enters the data base and its separated then.. so i got that thanks.. that seems like a better idea to use a date row instead.. how could i put it into the db when in parts like there will be a select form for the month day and month how can you combine it to fit into the db in the date row? and how could i take it out so its set up like January 14, 2006? thanks for you help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.