Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4003 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I m trying to find records based on date. I wan tto current date so geth this using get(currentDate)..but its in mm/dd/yyyy format and data are in

yyyy-mm-dd format

Posted

Do you mean your "dates" are stored in a TEXT field, in the form of "yyyy-mm-dd?

If so, why don't you convert them to real dates, using your file's format of m/d/y - instead of going the other way round? That way you get the full benefits of date manipulations - for example, you can search for dates in a given range.

 

 

The way you have it now, you would need to do:

Enter Find Mode []
Set Field [ YourTable::Textdate; Let ( d = Get(CurrentDate); Year ( d ) & SerialIncrement ( "-00" ; Month ( d ) ) & SerialIncrement ( "-00" ; Day ( d ) ) ) ]
Perform Find[]
  • Like 1
Posted

Thanks.Sorry but actually I want to find records based on timestamp means i want to find only those records which were creaated in last two hours .In this in this if I change format like this Set Variable[$date;Value:Year(Get(CurrentDate))&"-"&Month(Get(CurrentDate))&"-"&Day(Get(CurrentDate))]

This in day and months if its value are below 10 then give o/p 6 instead of "06"..

Posted

This in day and months if its value are below 10 then give o/p 6 instead of "06"..

 

Yes, I know it does. Have you tried - or even read - what I suggested?

Posted

I had a thought that perhaps the system date format might have been sett to mm/dd/yyyy. Yesterday a run time wouldn't accept the way I was inputting a date. Upon checking my system settings I found they had changed. Reading this thread back this is likely not related to th op's problem.

This topic is 4003 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.