CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Date Hassle - Please help! (RESOLVED)

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 12/27/2008, 11:08 AM

On my login form I have a text box called current_date. The data type is Date, the Format is yyyy-mm-dd and the Default Value is CurrentDate.

It displays the date perfectly as 2008-12-27.

I am trying to get this date into a variable to compare it with an expiry date stored in the users table. I can get the expiry date into a variable with :
$result = CCDLookUp("expiry_date","users","ID=".$db->ToSQL(CCGetUserID(),ccsInteger), $db);
no problem!

I cannot get the value from the current_date text box into a variable! I am using:
global $current_date;
$current_date = CCParseDate($Container->current_date->GetValue,"yyyy-mm-dd");
echo $current_date;

I have tried everything and cannot figure out my stupidity. I am going nuts with this. Please help if you can.
View profile  Send private message
mentecky

Posts: 321
Posted: 12/27/2008, 7:15 PM

saseow,

try:
$current_date = CCParseDate($Container->current_date->GetValue(),"yyyy-mm-dd");  

Rick
_________________
http://www.ccselite.com
View profile  Send private message
damian

Posts: 838
Posted: 12/27/2008, 7:18 PM

it may be that you are trying to get the date from the label before the labels value is set.
why do you need to assign it to a label first?
what if you just did this?
global $current_date;  
$current_date=date("Y-m-d");  
echo $current_date;  

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
damian

Posts: 838
Posted: 12/27/2008, 7:22 PM

Quote mentecky:
saseow,

try:
$current_date = CCParseDate($Container->current_date->GetValue(),"yyyy-mm-dd");  

Rick

Rick - that was my first thought but I couldnt get it to work and thought that the label might not have a value yet so i just set the variable and skipped the label?

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
saseow

Posts: 744
Posted: 12/27/2008, 7:35 PM

Thank you both for the help! Damian, I used your direct approach. Sometimes one just gets into a rut and can't see the wood for the trees.

Thanks again.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 12/28/2008, 6:27 AM

BTW

If you want a description of how dates are implemented in CSS take a look here

http://ccselite.com/forums_topics_view.php?forum_id=8&forum_topic_id=7


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
saseow

Posts: 744
Posted: 12/28/2008, 6:39 AM

Thank you jjrjr1,

I have stored this info for future reference.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.