set condition based when creation date does not equal modified date
here’s something that is likely simple but i’m stuck…

i’d like to show an element when parent group’s thing has been modified. when a new thing is created the modified date is the same as creation date. how can i set a condition as when creation date is older than modified date?
you should be able to set the element to not be visible on page load, and then on the conditional tab of the element, you should be able to construct a condition where parent group’s thing’s creation date < parent group’s thing’s modified date, this element is visible. and when i say “should be able…
> 
> What attributes I have to attach to the CreatedDate and ModifiedDate properties to make them automatically populated by the server based on the above scenario?
> 
> 
> 


**Solution 1)**



```
namespace Joukyuu.Models
{
    public class Passage
    {
        public int PassageId { get; set; }
        public string Contents { get; set; }


        public DateTime CreatedDate { get; set; }
        public DateTime ModifiedDate { get; set; }

       public Passage()
       {          
         this.CreatedDate  = DateTime.UtcNow;
         this.ModifiedDate = DateTime.UtcNow;
       }
    }
}

```

and by edit you have to change/update it by your self!


**Solution 2)**


Custom attribute:



```
[SqlDefaultValue(DefaultValue = "getutcdate()")]
public DateTime CreatedDate { get; set; }

```

[Entity Framework 6 Code first Default value](https://stackoverflow.com/questions/19554050/entity-framework-6-code-first-default-value)


**Solution 3)**


with help of Computed:



```
[Required, DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime CreatedUtc { get; set; 


  "dbo.Products",
            c => new
                {
                    ProductId = c.Int(nullable: false, identity: true),
                    Name = c.String(),
                    CreatedUtc = c.DateTime(nullable: false, defaultValueSql: "GETUTCDATE()"),
                })
            .PrimaryKey(t => t.ProductId);

```

<https://andy.mehalick.com/2014/02/06/ef6-adding-a-created-datetime-column-automatically-with-code-first-migrations/>


**Solution 4)**
You can also do this with command interceptor by modifying manually the query.


**Solution 5)** 
Use Repository pattern to manage the data creation and set it by CreateNew 
This is my favour Solution!


<https://msdn.microsoft.com/en-us/library/ff649690.aspx>


**Solution 6)** 
just set it or get in in the UI or in your VM.







In **Entity Framework Core 1.0** easy:



```
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Passage>()
        .Property(b => b.CreatedDate )
        .HasDefaultValueSql("getdate()");
}

``` and it's done exactly what you told it to: generate a field that's capable of holding an SQL DATE. Which means a field without a time.  

The correct way of indicating a timestamp using JPA is as follows:



```
   /**
     * Time/date of creation of an entity.
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATION_DATE")
    protected Date creationDate;

``` [image] akanksha\_varshney:

(convert.tostring(date\_created\_hs.substring(0,10)).equals(convert.tostring(date\_created\_cchq.substring(0,10)))) or (date\_created\_hs <> “”)

hey,

try with the following one,

(convert.tostring(date\_created\_hs.substring(0,10).trim).equals(convert.tostring(date\_created… > 
> i want to create ap application which generates popup alerts at the day of event ocurs as well as a day before the event will occur in a specific time interval as well.. events are stored in database and they are all date fields .. so i want to link those fields to create popups .. help me .
> 
> 
> 


In order to help you, you must first provide us with what you have achieved. We do not write code for you, simply correct and enlighten on mistakes. From the [Library Reference](http://docs.python.org/2/library/stdtypes.html#set-types-set-frozenset):



> 
> The set type is mutable — the contents can be changed using methods like add() and remove().
> 
> 
> [@thesocialgrowth](/u/thesocialgrowth) you need to enter the “update item & tags” section, write a “message to the reviewer” and then “save changes” to request a new review.

updating details does not trigger a new review, as detail updates do not require approval. Looks like YYMMDD to me. I would try to verify this in the documentation or whatever information source you have on the old database. You could also look for inappropriate numbers like MM not between 1 and 12 and DD not between 1 and 31. If you find any inappropriate numbers than this is the wrong approach. This does not look like a date based on an offset number of days after a start date because the start date would have to be about 2600 years ago. we’re being asked which of the following conditions occurs when a chemical change happens to a piece of wood let’s first define a physical change and a chemical change.physical change → there is a change in a matter as it goes from one physical state to another.chemical change → atoms rearrange themselves to create a new substance. now, let’s take a look at each condition:[readmore]a. is splitsplitting wood is only reducing its size. physical changeb. is paintedpainting wood is only placing paint on top of it and not really affecting the composition of the wood.  physical changec. decaysdecaying changes the integrity of the wood itself and transforms it into things like soil. chemical changed. is cutcutting wood is only reducing its size. physical changea chemical change occurs when a piece of wood c. decays. java.sql.timestamp is a subclass of java.util.date - it should work the same for comparison purposes:

<https://docs.oracle.com/en/java/javase/11/docs/api/java.sql/java/sql/timestamp.html>

if you specifically need a date, you could convert it back pretty easily; check if isinstance(java.sql.timestamp… i've been meaning to write a blog post on this for a while, but haven't got round to it yet, so i'll give the condensed version here :slight\_smile:

to understand why the if let syntax is the way it is, we should first look at the let syntax. in most cases, you'll see it used for simple variable dec…